diff options
author | jstebbins <[email protected]> | 2008-10-03 20:59:50 +0000 |
---|---|---|
committer | jstebbins <[email protected]> | 2008-10-03 20:59:50 +0000 |
commit | c1764222478a827d20dd4c029642d5866750e4d3 (patch) | |
tree | 078a47f18262ed42acc7fd3c43f80de6c3560305 /gtk | |
parent | 5c3240cca3b0469280484f18c2d07b5f9af42f81 (diff) |
LinGui: change the top level structure that contains presets from a dictionary
to an array. Dictionaries are unordered sets, so this new structure
allows greater flexibility in how the presets may be ordered.
Is backwards compatible. Old structure is read and converted to new.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1804 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'gtk')
-rw-r--r-- | gtk/src/presets.c | 157 | ||||
-rw-r--r-- | gtk/src/resource_data.h | 58 | ||||
-rw-r--r-- | gtk/src/resources.plist | 58 | ||||
-rw-r--r-- | gtk/src/standard_presets.xml | 58 |
4 files changed, 237 insertions, 94 deletions
diff --git a/gtk/src/presets.c b/gtk/src/presets.c index 0298b1a6e..03f9501f7 100644 --- a/gtk/src/presets.c +++ b/gtk/src/presets.c @@ -35,6 +35,49 @@ plist_get_dict(GValue *presets, const gchar *name) return ghb_dict_lookup(presets, name); } +static GValue* +presets_get_dict(GValue *presets, const gchar *name) +{ + GValue *dict, *gval; + gint count, ii; + + if (presets == NULL || name == NULL) return NULL; + count = ghb_array_len(presets); + for (ii = 0; ii < count; ii++) + { + const gchar *str; + dict = ghb_array_get_nth(presets, ii); + gval = ghb_dict_lookup(dict, "preset_name"); + str = g_value_get_string(gval); + if (strcmp(str, name) == 0) + return dict; + } + return NULL; +} + +static gint +presets_remove(GValue *presets, const gchar *name) +{ + GValue *dict, *gval; + gint count, ii; + + 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); + gval = ghb_dict_lookup(dict, "preset_name"); + str = g_value_get_string(gval); + if (strcmp(str, name) == 0) + { + ghb_array_remove(presets, ii); + return ii; + } + } + return -1; +} + void ghb_set_preset_default(GValue *settings) { @@ -60,7 +103,7 @@ gchar* ghb_presets_get_description(const gchar *name) { GValue *pdict; - pdict = plist_get_dict(presetsPlist, name); + pdict = presets_get_dict(presetsPlist, name); if (pdict == NULL) return g_strdup(""); return ghb_value_string(ghb_dict_lookup(pdict, "preset_description")); } @@ -93,37 +136,42 @@ preset_get_value( { GValue *dict; - dict = plist_get_dict(presetsPlist, name); + dict = presets_get_dict(presetsPlist, name); return preset_dict_get_value(dict, key); } GList* ghb_presets_get_names() { - GHashTable *dict; - GList *names, *link; + GList *names; GList *standard = NULL; GList *custom = NULL; + gint ii, count; if (presetsPlist == NULL) return NULL; - dict = g_value_get_boxed(presetsPlist); - link = names = g_hash_table_get_keys(dict); - while (link) + count = ghb_array_len(presetsPlist); + for (ii = 0; ii < count; ii++) { gchar *name; gint ptype; + GValue *dict; + GValue *gval; - name = (gchar*)link->data; - ptype = ghb_value_int(preset_get_value(name, "preset_type")); + dict = ghb_array_get_nth(presetsPlist, ii); + gval = ghb_dict_lookup(dict, "preset_name"); + name = (gchar*)g_value_get_string(gval); + ptype = ghb_value_int(preset_dict_get_value(dict, "preset_type")); if (ptype) + { custom = g_list_append(custom, name); + } else + { standard = g_list_append(standard, name); - link = link->next; + } } custom = g_list_sort(custom, key_cmp); standard = g_list_sort(standard, key_cmp); - g_list_free(names); names = g_list_concat(standard, custom); return names; } @@ -136,7 +184,7 @@ ghb_preset_flags(const gchar *name) gint ptype; gint ret = 0; - dict = plist_get_dict(presetsPlist, name); + dict = presets_get_dict(presetsPlist, name); gval = preset_dict_get_value(dict, "preset_type"); if (gval) { @@ -321,7 +369,7 @@ ghb_set_preset(signal_user_data_t *ud, const gchar *name) g_list_free(presets); } } - dict = plist_get_dict(presetsPlist, name); + dict = presets_get_dict(presetsPlist, name); if (dict == NULL || name == NULL) { preset_to_ui(ud, NULL); @@ -604,8 +652,8 @@ ghb_settings_init(signal_user_data_t *ud) void ghb_settings_close() { - //if (internalPlist) - //ghb_value_free(internalPlist); + if (internalPlist) + ghb_value_free(internalPlist); if (presetsPlist) ghb_value_free(presetsPlist); if (prefsPlist) @@ -654,36 +702,41 @@ ghb_prefs_load(signal_user_data_t *ud) void ghb_presets_reload(signal_user_data_t *ud) { - GValue *std_dict, *dict; - GHashTableIter std_iter; + GValue *std_presets; + gint count, ii; g_debug("ghb_presets_reload()\n"); - std_dict = ghb_resource_get("standard-presets"); - if (std_dict == NULL) return; + std_presets = ghb_resource_get("standard-presets"); + if (std_presets == NULL) return; // Merge the keyfile contents into our presets - gchar *name; - GValue *orig_dict; - - ghb_dict_iter_init(&std_iter, std_dict); - // middle (void*) cast prevents gcc warning "defreferencing type-punned - // pointer will break strict-aliasing rules" - while (g_hash_table_iter_next( - &std_iter, (gpointer*)(void*)&name, (gpointer*)(void*)&orig_dict)) + count = ghb_array_len(std_presets); + for (ii = 0; ii < count; ii++) { + const gchar *name; + GValue *std_dict; + GValue *copy_dict; GHashTableIter iter; gchar *key; GValue *value; + gint pos; - dict = ghb_dict_value_new(); - ghb_dict_insert(presetsPlist, g_strdup(name), dict); - ghb_dict_iter_init(&iter, orig_dict); + std_dict = ghb_array_get_nth(std_presets, ii); + name = g_value_get_string(ghb_dict_lookup(std_dict, "preset_name")); + pos = presets_remove(presetsPlist, name); + + copy_dict = ghb_dict_value_new(); + if (pos >= 0) + ghb_array_insert(presetsPlist, pos, copy_dict); + else + ghb_array_append(presetsPlist, copy_dict); + ghb_dict_iter_init(&iter, std_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)) { - ghb_dict_insert(dict, g_strdup(key), ghb_value_dup(value)); + ghb_dict_insert(copy_dict, g_strdup(key), ghb_value_dup(value)); } } store_plist(presetsPlist, "presets"); @@ -723,6 +776,41 @@ ghb_presets_load() presetsPlist = ghb_value_dup(ghb_resource_get("standard-presets")); presets_store(); } + if (G_VALUE_TYPE(presetsPlist) == ghb_dict_get_type()) + { // Presets is older dictionary format. Convert to array + GHashTableIter old_iter; + GValue *presets; + gchar *name; + GValue *orig_dict; + + presets = ghb_array_value_new(32); + ghb_dict_iter_init(&old_iter, presetsPlist); + // middle (void*) cast prevents gcc warning "defreferencing type-punned + // pointer will break strict-aliasing rules" + while (g_hash_table_iter_next( + &old_iter, (gpointer*)(void*)&name, (gpointer*)(void*)&orig_dict)) + { + GHashTableIter iter; + gchar *key; + GValue *value, *dict; + + dict = ghb_dict_value_new(); + ghb_dict_insert(dict, g_strdup("preset_name"), + ghb_string_value_new(name)); + ghb_array_append(presets, dict); + ghb_dict_iter_init(&iter, orig_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)) + { + ghb_dict_insert(dict, g_strdup(key), ghb_value_dup(value)); + } + } + ghb_value_free(presetsPlist); + presetsPlist = presets; + presets_store(); + } } void @@ -755,7 +843,8 @@ ghb_settings_save(signal_user_data_t *ud, const gchar *name) ghb_settings_set_int64(ud->settings, "preset_type", 1); dict = ghb_dict_value_new(); - ghb_dict_insert(presetsPlist, g_strdup(name), dict); + ghb_dict_insert(dict, g_strdup("preset_name"), ghb_string_value_new(name)); + ghb_array_append(presetsPlist, dict); internal = plist_get_dict(internalPlist, "Presets"); ghb_dict_iter_init(&iter, internal); @@ -800,9 +889,9 @@ ghb_settings_save(signal_user_data_t *ud, const gchar *name) void ghb_presets_remove(const gchar *name) { - if (ghb_dict_lookup(presetsPlist, name)) + if (presets_get_dict(presetsPlist, name)) { - ghb_dict_remove(presetsPlist, name); + presets_remove(presetsPlist, name); presets_store(); } } diff --git a/gtk/src/resource_data.h b/gtk/src/resource_data.h index 63e6ece92..379b1d826 100644 --- a/gtk/src/resource_data.h +++ b/gtk/src/resource_data.h @@ -10134,8 +10134,7 @@ " </dict>\n" " </dict>\n" " <key>standard-presets</key>\n" -" <dict>\n" -" <key>Animation</key>\n" +" <array>\n" " <dict>\n" " <key>anamorphic</key>\n" " <true />\n" @@ -10185,6 +10184,8 @@ " <key>preset_description</key>\n" " <string>HandBrake's settings for cartoons, anime, and CGI.</str" "ing>\n" +" <key>preset_name</key>\n" +" <string>Animation</string>\n" " <key>preset_type</key>\n" " <integer>0</integer>\n" " <key>subtitle_lang</key>\n" @@ -10208,7 +10209,6 @@ "pyramid:me=umh:analyse=all:8x8dct:trellis=1:nr=150:no-fast-pskip:filter" "=2,2</string>\n" " </dict>\n" -" <key>AppleTV</key>\n" " <dict>\n" " <key>anamorphic</key>\n" " <true />\n" @@ -10271,6 +10271,8 @@ " <string>HandBrake's settings for the AppleTV, including Dolby D" "igital 5.1 AC3 sound. Provides a good balance between quality and file " "size, and optimizes performance.</string>\n" +" <key>preset_name</key>\n" +" <string>AppleTV</string>\n" " <key>preset_type</key>\n" " <integer>0</integer>\n" " <key>subtitle_lang</key>\n" @@ -10291,7 +10293,6 @@ " <string>bframes=3:ref=1:me=umh:no-fast-pskip=1:trellis=1:cabac=0</st" "ring>\n" " </dict>\n" -" <key>Bedlam</key>\n" " <dict>\n" " <key>anamorphic</key>\n" " <true />\n" @@ -10342,6 +10343,8 @@ " <string>HandBrake's settings maxed out for slowest encoding and" " highest quality. Use at your own risk. So slow it's not just insa" "ne...it's a trip to the looney bin.</string>\n" +" <key>preset_name</key>\n" +" <string>Bedlam</string>\n" " <key>preset_type</key>\n" " <integer>0</integer>\n" " <key>subtitle_lang</key>\n" @@ -10365,7 +10368,6 @@ "b-pyramid:me=esa:subme=7:me-range=64:analyse=all:8x8dct:trellis=1:no-fa" "st-pskip:no-dct-decimate:filter=-2,-1</string>\n" " </dict>\n" -" <key>Blind</key>\n" " <dict>\n" " <key>anamorphic</key>\n" " <false />\n" @@ -10415,6 +10417,8 @@ " <key>preset_description</key>\n" " <string>HandBrake's preset for impatient people who don't " "care about picture quality.</string>\n" +" <key>preset_name</key>\n" +" <string>Blind</string>\n" " <key>preset_type</key>\n" " <integer>0</integer>\n" " <key>subtitle_lang</key>\n" @@ -10436,7 +10440,6 @@ " <key>x264_options</key>\n" " <string></string>\n" " </dict>\n" -" <key>Broke</key>\n" " <dict>\n" " <key>anamorphic</key>\n" " <false />\n" @@ -10487,6 +10490,8 @@ " <string>HandBrake's preset for people without a lot of money to" " waste on hard drives. Tries to maximize quality for burning to CDs, so" " you can party like it's 1999.</string>\n" +" <key>preset_name</key>\n" +" <string>Broke</string>\n" " <key>preset_type</key>\n" " <integer>0</integer>\n" " <key>subtitle_lang</key>\n" @@ -10509,7 +10514,6 @@ " <string>ref=3:mixed-refs:bframes=16:bime:weightb:b-rdo:b-pyramid:dir" "ect=auto:me=umh:trellis=1:analyse=all:8x8dct:no-fast-pskip</string>\n" " </dict>\n" -" <key>Classic</key>\n" " <dict>\n" " <key>anamorphic</key>\n" " <false />\n" @@ -10559,6 +10563,8 @@ " <key>preset_description</key>\n" " <string>HandBrake's traditional, faster, lower-quality settings" ".</string>\n" +" <key>preset_name</key>\n" +" <string>Classic</string>\n" " <key>preset_type</key>\n" " <integer>0</integer>\n" " <key>subtitle_lang</key>\n" @@ -10578,7 +10584,6 @@ " <key>x264_options</key>\n" " <string></string>\n" " </dict>\n" -" <key>Constant Quality Rate</key>\n" " <dict>\n" " <key>anamorphic</key>\n" " <true />\n" @@ -10629,6 +10634,8 @@ " <string>HandBrake's preset for consistently excellent quality i" "n one pass, with the downside of entirely unpredictable file sizes and " "bitrates.</string>\n" +" <key>preset_name</key>\n" +" <string>Constant Quality Rate</string>\n" " <key>preset_type</key>\n" " <integer>0</integer>\n" " <key>subtitle_lang</key>\n" @@ -10651,7 +10658,6 @@ " <string>ref=3:mixed-refs:bframes=3:b-pyramid:b-rdo:bime:weightb:filt" "er=-2,-1:trellis=1:analyse=all:8x8dct:me=umh</string>\n" " </dict>\n" -" <key>Deux Six Quatre</key>\n" " <dict>\n" " <key>anamorphic</key>\n" " <true />\n" @@ -10703,6 +10709,8 @@ "A good balance of quality and speed, based on community standards found" " in the wild. This preset will give you a much better sense of x264&apo" "s;s capabilities than vanilla main profile.</string>\n" +" <key>preset_name</key>\n" +" <string>Deux Six Quatre</string>\n" " <key>preset_type</key>\n" " <integer>0</integer>\n" " <key>subtitle_lang</key>\n" @@ -10725,7 +10733,6 @@ " <string>ref=5:mixed-refs:bframes=3:bime:weightb:b-rdo:b-pyramid:me=u" "mh:subme=7:trellis=1:analyse=all:8x8dct:no-fast-pskip</string>\n" " </dict>\n" -" <key>Film</key>\n" " <dict>\n" " <key>anamorphic</key>\n" " <true />\n" @@ -10774,6 +10781,8 @@ " </array>\n" " <key>preset_description</key>\n" " <string>HandBrake's preset for feature films.</string>\n" +" <key>preset_name</key>\n" +" <string>Film</string>\n" " <key>preset_type</key>\n" " <integer>0</integer>\n" " <key>subtitle_lang</key>\n" @@ -10797,7 +10806,6 @@ "pyramid:me=umh:subme=7:analyse=all:8x8dct:trellis=1:no-fast-pskip</stri" "ng>\n" " </dict>\n" -" <key>Normal</key>\n" " <dict>\n" " <key>anamorphic</key>\n" " <true />\n" @@ -10846,6 +10854,8 @@ " </array>\n" " <key>preset_description</key>\n" " <string>HandBrake's normal, default settings.</string>\n" +" <key>preset_name</key>\n" +" <string>Normal</string>\n" " <key>preset_type</key>\n" " <integer>0</integer>\n" " <key>subtitle_lang</key>\n" @@ -10867,7 +10877,6 @@ " <key>x264_options</key>\n" " <string>ref=2:bframes=2:me=umh</string>\n" " </dict>\n" -" <key>PS3</key>\n" " <dict>\n" " <key>anamorphic</key>\n" " <true />\n" @@ -10915,6 +10924,8 @@ " <key>preset_description</key>\n" " <string>HandBrake's settings for the Sony PlayStation 3.</strin" "g>\n" +" <key>preset_name</key>\n" +" <string>PS3</string>\n" " <key>preset_type</key>\n" " <integer>0</integer>\n" " <key>subtitle_lang</key>\n" @@ -10934,7 +10945,6 @@ " <key>x264_options</key>\n" " <string>level=41:me=umh</string>\n" " </dict>\n" -" <key>PSP</key>\n" " <dict>\n" " <key>anamorphic</key>\n" " <false />\n" @@ -10984,6 +10994,8 @@ " <key>preset_description</key>\n" " <string>HandBrake's settings for the Sony PlayStation Portable." "</string>\n" +" <key>preset_name</key>\n" +" <string>PSP</string>\n" " <key>preset_type</key>\n" " <integer>0</integer>\n" " <key>subtitle_lang</key>\n" @@ -11003,7 +11015,6 @@ " <key>x264_options</key>\n" " <string></string>\n" " </dict>\n" -" <key>QuickTime</key>\n" " <dict>\n" " <key>anamorphic</key>\n" " <true />\n" @@ -11054,6 +11065,8 @@ " <string>HandBrake's high quality settings for use with QuickTim" "e. It can be slow, so use it when the Normal preset doesn't look g" "ood enough.</string>\n" +" <key>preset_name</key>\n" +" <string>QuickTime</string>\n" " <key>preset_type</key>\n" " <integer>0</integer>\n" " <key>subtitle_lang</key>\n" @@ -11076,7 +11089,6 @@ " <string>ref=3:mixed-refs:bframes=3:bime:weightb:b-rdo:direct=auto:me" "=umh:analyse=all:trellis=1:no-fast-pskip</string>\n" " </dict>\n" -" <key>Television</key>\n" " <dict>\n" " <key>anamorphic</key>\n" " <false />\n" @@ -11126,6 +11138,8 @@ " <key>preset_description</key>\n" " <string>HandBrake's settings for video from television.</string" ">\n" +" <key>preset_name</key>\n" +" <string>Television</string>\n" " <key>preset_type</key>\n" " <integer>0</integer>\n" " <key>subtitle_lang</key>\n" @@ -11148,7 +11162,6 @@ " <string>ref=3:mixed-refs:bframes=6:bime:weightb:direct=auto:b-pyrami" "d:me=umh:analyse=all:8x8dct:trellis=1:nr=150:no-fast-pskip</string>\n" " </dict>\n" -" <key>Xbox 360</key>\n" " <dict>\n" " <key>anamorphic</key>\n" " <true />\n" @@ -11196,6 +11209,8 @@ " <key>preset_description</key>\n" " <string>HandBrake's settings for the Microsoft Xbox 360.</strin" "g>\n" +" <key>preset_name</key>\n" +" <string>Xbox 360</string>\n" " <key>preset_type</key>\n" " <integer>0</integer>\n" " <key>subtitle_lang</key>\n" @@ -11217,7 +11232,6 @@ "t=auto:b-pyramid:me=umh:analyse=all:no-fast-pskip:filter=-2,-1</string>" "\n" " </dict>\n" -" <key>iPhone / iPod Touch</key>\n" " <dict>\n" " <key>anamorphic</key>\n" " <false />\n" @@ -11269,6 +11283,8 @@ " <key>preset_description</key>\n" " <string>HandBrake's settings for the iPhone and iPod Touch.</st" "ring>\n" +" <key>preset_name</key>\n" +" <string>iPhone / iPod Touch</string>\n" " <key>preset_type</key>\n" " <integer>0</integer>\n" " <key>subtitle_lang</key>\n" @@ -11289,7 +11305,6 @@ " <string>level=30:cabac=0:ref=1:analyse=all:me=umh:no-fast-pskip=1:tr" "ellis=1</string>\n" " </dict>\n" -" <key>iPod High-Rez</key>\n" " <dict>\n" " <key>anamorphic</key>\n" " <false />\n" @@ -11341,6 +11356,8 @@ " <key>preset_description</key>\n" " <string>HandBrake's high resolution settings for the iPod. Good" " video quality, great for viewing on a TV using your iPod</string>\n" +" <key>preset_name</key>\n" +" <string>iPod High-Rez</string>\n" " <key>preset_type</key>\n" " <integer>0</integer>\n" " <key>subtitle_lang</key>\n" @@ -11361,7 +11378,6 @@ " <string>level=30:bframes=0:cabac=0:ref=1:vbv-maxrate=1500:vbv-bufsiz" "e=2000:analyse=all:me=umh:no-fast-pskip=1</string>\n" " </dict>\n" -" <key>iPod Low-Rez</key>\n" " <dict>\n" " <key>anamorphic</key>\n" " <false />\n" @@ -11414,6 +11430,8 @@ " <string>HandBrake's low resolution settings for the iPod. Optim" "ized for great playback on the iPod screen, with smaller file size.</st" "ring>\n" +" <key>preset_name</key>\n" +" <string>iPod Low-Rez</string>\n" " <key>preset_type</key>\n" " <integer>0</integer>\n" " <key>subtitle_lang</key>\n" @@ -11434,7 +11452,7 @@ " <string>level=30:bframes=0:cabac=0:ref=1:vbv-maxrate=768:vbv-bufsize" "=2000:analyse=all:me=umh:no-fast-pskip=1</string>\n" " </dict>\n" -" </dict>\n" +" </array>\n" " <key>widget-deps</key>\n" " <dict>\n" " <key>anamorphic</key>\n" diff --git a/gtk/src/resources.plist b/gtk/src/resources.plist index 63ead6603..2a9ddc706 100644 --- a/gtk/src/resources.plist +++ b/gtk/src/resources.plist @@ -5017,8 +5017,7 @@ R2RrUAAABBgBAQACAAAAQAAAABAAAAAQ////AP///wD///8A////AP///wD///8A////AP///wD///8A </dict> </dict> <key>standard-presets</key> - <dict> - <key>Animation</key> + <array> <dict> <key>anamorphic</key> <true /> @@ -5067,6 +5066,8 @@ R2RrUAAABBgBAQACAAAAQAAAABAAAAAQ////AP///wD///8A////AP///wD///8A////AP///wD///8A </array> <key>preset_description</key> <string>HandBrake's settings for cartoons, anime, and CGI.</string> + <key>preset_name</key> + <string>Animation</string> <key>preset_type</key> <integer>0</integer> <key>subtitle_lang</key> @@ -5088,7 +5089,6 @@ R2RrUAAABBgBAQACAAAAQAAAABAAAAAQ////AP///wD///8A////AP///wD///8A////AP///wD///8A <key>x264_options</key> <string>ref=5:mixed-refs:bframes=6:bime:weightb:b-rdo:direct=auto:b-pyramid:me=umh:analyse=all:8x8dct:trellis=1:nr=150:no-fast-pskip:filter=2,2</string> </dict> - <key>AppleTV</key> <dict> <key>anamorphic</key> <true /> @@ -5149,6 +5149,8 @@ R2RrUAAABBgBAQACAAAAQAAAABAAAAAQ////AP///wD///8A////AP///wD///8A////AP///wD///8A </array> <key>preset_description</key> <string>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.</string> + <key>preset_name</key> + <string>AppleTV</string> <key>preset_type</key> <integer>0</integer> <key>subtitle_lang</key> @@ -5168,7 +5170,6 @@ R2RrUAAABBgBAQACAAAAQAAAABAAAAAQ////AP///wD///8A////AP///wD///8A////AP///wD///8A <key>x264_options</key> <string>bframes=3:ref=1:me=umh:no-fast-pskip=1:trellis=1:cabac=0</string> </dict> - <key>Bedlam</key> <dict> <key>anamorphic</key> <true /> @@ -5217,6 +5218,8 @@ R2RrUAAABBgBAQACAAAAQAAAABAAAAAQ////AP///wD///8A////AP///wD///8A////AP///wD///8A </array> <key>preset_description</key> <string>HandBrake's settings maxed out for slowest encoding and highest quality. Use at your own risk. So slow it's not just insane...it's a trip to the looney bin.</string> + <key>preset_name</key> + <string>Bedlam</string> <key>preset_type</key> <integer>0</integer> <key>subtitle_lang</key> @@ -5238,7 +5241,6 @@ R2RrUAAABBgBAQACAAAAQAAAABAAAAAQ////AP///wD///8A////AP///wD///8A////AP///wD///8A <key>x264_options</key> <string>ref=16:mixed-refs:bframes=16:bime:weightb:b-rdo:direct=auto:b-pyramid:me=esa:subme=7:me-range=64:analyse=all:8x8dct:trellis=1:no-fast-pskip:no-dct-decimate:filter=-2,-1</string> </dict> - <key>Blind</key> <dict> <key>anamorphic</key> <false /> @@ -5287,6 +5289,8 @@ R2RrUAAABBgBAQACAAAAQAAAABAAAAAQ////AP///wD///8A////AP///wD///8A////AP///wD///8A </array> <key>preset_description</key> <string>HandBrake's preset for impatient people who don't care about picture quality.</string> + <key>preset_name</key> + <string>Blind</string> <key>preset_type</key> <integer>0</integer> <key>subtitle_lang</key> @@ -5308,7 +5312,6 @@ R2RrUAAABBgBAQACAAAAQAAAABAAAAAQ////AP///wD///8A////AP///wD///8A////AP///wD///8A <key>x264_options</key> <string></string> </dict> - <key>Broke</key> <dict> <key>anamorphic</key> <false /> @@ -5357,6 +5360,8 @@ R2RrUAAABBgBAQACAAAAQAAAABAAAAAQ////AP///wD///8A////AP///wD///8A////AP///wD///8A </array> <key>preset_description</key> <string>HandBrake's preset for people without a lot of money to waste on hard drives. Tries to maximize quality for burning to CDs, so you can party like it's 1999.</string> + <key>preset_name</key> + <string>Broke</string> <key>preset_type</key> <integer>0</integer> <key>subtitle_lang</key> @@ -5378,7 +5383,6 @@ R2RrUAAABBgBAQACAAAAQAAAABAAAAAQ////AP///wD///8A////AP///wD///8A////AP///wD///8A <key>x264_options</key> <string>ref=3:mixed-refs:bframes=16:bime:weightb:b-rdo:b-pyramid:direct=auto:me=umh:trellis=1:analyse=all:8x8dct:no-fast-pskip</string> </dict> - <key>Classic</key> <dict> <key>anamorphic</key> <false /> @@ -5427,6 +5431,8 @@ R2RrUAAABBgBAQACAAAAQAAAABAAAAAQ////AP///wD///8A////AP///wD///8A////AP///wD///8A </array> <key>preset_description</key> <string>HandBrake's traditional, faster, lower-quality settings.</string> + <key>preset_name</key> + <string>Classic</string> <key>preset_type</key> <integer>0</integer> <key>subtitle_lang</key> @@ -5446,7 +5452,6 @@ R2RrUAAABBgBAQACAAAAQAAAABAAAAAQ////AP///wD///8A////AP///wD///8A////AP///wD///8A <key>x264_options</key> <string></string> </dict> - <key>Constant Quality Rate</key> <dict> <key>anamorphic</key> <true /> @@ -5495,6 +5500,8 @@ R2RrUAAABBgBAQACAAAAQAAAABAAAAAQ////AP///wD///8A////AP///wD///8A////AP///wD///8A </array> <key>preset_description</key> <string>HandBrake's preset for consistently excellent quality in one pass, with the downside of entirely unpredictable file sizes and bitrates.</string> + <key>preset_name</key> + <string>Constant Quality Rate</string> <key>preset_type</key> <integer>0</integer> <key>subtitle_lang</key> @@ -5516,7 +5523,6 @@ R2RrUAAABBgBAQACAAAAQAAAABAAAAAQ////AP///wD///8A////AP///wD///8A////AP///wD///8A <key>x264_options</key> <string>ref=3:mixed-refs:bframes=3:b-pyramid:b-rdo:bime:weightb:filter=-2,-1:trellis=1:analyse=all:8x8dct:me=umh</string> </dict> - <key>Deux Six Quatre</key> <dict> <key>anamorphic</key> <true /> @@ -5565,6 +5571,8 @@ R2RrUAAABBgBAQACAAAAQAAAABAAAAAQ////AP///wD///8A////AP///wD///8A////AP///wD///8A </array> <key>preset_description</key> <string>HandBrake's preset for true high profile x264 quality. A good balance of quality and speed, based on community standards found in the wild. This preset will give you a much better sense of x264's capabilities than vanilla main profile.</string> + <key>preset_name</key> + <string>Deux Six Quatre</string> <key>preset_type</key> <integer>0</integer> <key>subtitle_lang</key> @@ -5586,7 +5594,6 @@ R2RrUAAABBgBAQACAAAAQAAAABAAAAAQ////AP///wD///8A////AP///wD///8A////AP///wD///8A <key>x264_options</key> <string>ref=5:mixed-refs:bframes=3:bime:weightb:b-rdo:b-pyramid:me=umh:subme=7:trellis=1:analyse=all:8x8dct:no-fast-pskip</string> </dict> - <key>Film</key> <dict> <key>anamorphic</key> <true /> @@ -5635,6 +5642,8 @@ R2RrUAAABBgBAQACAAAAQAAAABAAAAAQ////AP///wD///8A////AP///wD///8A////AP///wD///8A </array> <key>preset_description</key> <string>HandBrake's preset for feature films.</string> + <key>preset_name</key> + <string>Film</string> <key>preset_type</key> <integer>0</integer> <key>subtitle_lang</key> @@ -5656,7 +5665,6 @@ R2RrUAAABBgBAQACAAAAQAAAABAAAAAQ////AP///wD///8A////AP///wD///8A////AP///wD///8A <key>x264_options</key> <string>ref=3:mixed-refs:bframes=6:bime:weightb:b-rdo:direct=auto:b-pyramid:me=umh:subme=7:analyse=all:8x8dct:trellis=1:no-fast-pskip</string> </dict> - <key>Normal</key> <dict> <key>anamorphic</key> <true /> @@ -5705,6 +5713,8 @@ R2RrUAAABBgBAQACAAAAQAAAABAAAAAQ////AP///wD///8A////AP///wD///8A////AP///wD///8A </array> <key>preset_description</key> <string>HandBrake's normal, default settings.</string> + <key>preset_name</key> + <string>Normal</string> <key>preset_type</key> <integer>0</integer> <key>subtitle_lang</key> @@ -5726,7 +5736,6 @@ R2RrUAAABBgBAQACAAAAQAAAABAAAAAQ////AP///wD///8A////AP///wD///8A////AP///wD///8A <key>x264_options</key> <string>ref=2:bframes=2:me=umh</string> </dict> - <key>PS3</key> <dict> <key>anamorphic</key> <true /> @@ -5773,6 +5782,8 @@ R2RrUAAABBgBAQACAAAAQAAAABAAAAAQ////AP///wD///8A////AP///wD///8A////AP///wD///8A </array> <key>preset_description</key> <string>HandBrake's settings for the Sony PlayStation 3.</string> + <key>preset_name</key> + <string>PS3</string> <key>preset_type</key> <integer>0</integer> <key>subtitle_lang</key> @@ -5792,7 +5803,6 @@ R2RrUAAABBgBAQACAAAAQAAAABAAAAAQ////AP///wD///8A////AP///wD///8A////AP///wD///8A <key>x264_options</key> <string>level=41:me=umh</string> </dict> - <key>PSP</key> <dict> <key>anamorphic</key> <false /> @@ -5841,6 +5851,8 @@ R2RrUAAABBgBAQACAAAAQAAAABAAAAAQ////AP///wD///8A////AP///wD///8A////AP///wD///8A </array> <key>preset_description</key> <string>HandBrake's settings for the Sony PlayStation Portable.</string> + <key>preset_name</key> + <string>PSP</string> <key>preset_type</key> <integer>0</integer> <key>subtitle_lang</key> @@ -5860,7 +5872,6 @@ R2RrUAAABBgBAQACAAAAQAAAABAAAAAQ////AP///wD///8A////AP///wD///8A////AP///wD///8A <key>x264_options</key> <string></string> </dict> - <key>QuickTime</key> <dict> <key>anamorphic</key> <true /> @@ -5909,6 +5920,8 @@ R2RrUAAABBgBAQACAAAAQAAAABAAAAAQ////AP///wD///8A////AP///wD///8A////AP///wD///8A </array> <key>preset_description</key> <string>HandBrake's high quality settings for use with QuickTime. It can be slow, so use it when the Normal preset doesn't look good enough.</string> + <key>preset_name</key> + <string>QuickTime</string> <key>preset_type</key> <integer>0</integer> <key>subtitle_lang</key> @@ -5930,7 +5943,6 @@ R2RrUAAABBgBAQACAAAAQAAAABAAAAAQ////AP///wD///8A////AP///wD///8A////AP///wD///8A <key>x264_options</key> <string>ref=3:mixed-refs:bframes=3:bime:weightb:b-rdo:direct=auto:me=umh:analyse=all:trellis=1:no-fast-pskip</string> </dict> - <key>Television</key> <dict> <key>anamorphic</key> <false /> @@ -5979,6 +5991,8 @@ R2RrUAAABBgBAQACAAAAQAAAABAAAAAQ////AP///wD///8A////AP///wD///8A////AP///wD///8A </array> <key>preset_description</key> <string>HandBrake's settings for video from television.</string> + <key>preset_name</key> + <string>Television</string> <key>preset_type</key> <integer>0</integer> <key>subtitle_lang</key> @@ -6000,7 +6014,6 @@ R2RrUAAABBgBAQACAAAAQAAAABAAAAAQ////AP///wD///8A////AP///wD///8A////AP///wD///8A <key>x264_options</key> <string>ref=3:mixed-refs:bframes=6:bime:weightb:direct=auto:b-pyramid:me=umh:analyse=all:8x8dct:trellis=1:nr=150:no-fast-pskip</string> </dict> - <key>Xbox 360</key> <dict> <key>anamorphic</key> <true /> @@ -6047,6 +6060,8 @@ R2RrUAAABBgBAQACAAAAQAAAABAAAAAQ////AP///wD///8A////AP///wD///8A////AP///wD///8A </array> <key>preset_description</key> <string>HandBrake's settings for the Microsoft Xbox 360.</string> + <key>preset_name</key> + <string>Xbox 360</string> <key>preset_type</key> <integer>0</integer> <key>subtitle_lang</key> @@ -6066,7 +6081,6 @@ R2RrUAAABBgBAQACAAAAQAAAABAAAAAQ////AP///wD///8A////AP///wD///8A////AP///wD///8A <key>x264_options</key> <string>level=40:ref=2:mixed-refs:bframes=3:bime:weightb:b-rdo:direct=auto:b-pyramid:me=umh:analyse=all:no-fast-pskip:filter=-2,-1</string> </dict> - <key>iPhone / iPod Touch</key> <dict> <key>anamorphic</key> <false /> @@ -6117,6 +6131,8 @@ R2RrUAAABBgBAQACAAAAQAAAABAAAAAQ////AP///wD///8A////AP///wD///8A////AP///wD///8A </array> <key>preset_description</key> <string>HandBrake's settings for the iPhone and iPod Touch.</string> + <key>preset_name</key> + <string>iPhone / iPod Touch</string> <key>preset_type</key> <integer>0</integer> <key>subtitle_lang</key> @@ -6136,7 +6152,6 @@ R2RrUAAABBgBAQACAAAAQAAAABAAAAAQ////AP///wD///8A////AP///wD///8A////AP///wD///8A <key>x264_options</key> <string>level=30:cabac=0:ref=1:analyse=all:me=umh:no-fast-pskip=1:trellis=1</string> </dict> - <key>iPod High-Rez</key> <dict> <key>anamorphic</key> <false /> @@ -6187,6 +6202,8 @@ R2RrUAAABBgBAQACAAAAQAAAABAAAAAQ////AP///wD///8A////AP///wD///8A////AP///wD///8A </array> <key>preset_description</key> <string>HandBrake's high resolution settings for the iPod. Good video quality, great for viewing on a TV using your iPod</string> + <key>preset_name</key> + <string>iPod High-Rez</string> <key>preset_type</key> <integer>0</integer> <key>subtitle_lang</key> @@ -6206,7 +6223,6 @@ R2RrUAAABBgBAQACAAAAQAAAABAAAAAQ////AP///wD///8A////AP///wD///8A////AP///wD///8A <key>x264_options</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> - <key>iPod Low-Rez</key> <dict> <key>anamorphic</key> <false /> @@ -6257,6 +6273,8 @@ R2RrUAAABBgBAQACAAAAQAAAABAAAAAQ////AP///wD///8A////AP///wD///8A////AP///wD///8A </array> <key>preset_description</key> <string>HandBrake's low resolution settings for the iPod. Optimized for great playback on the iPod screen, with smaller file size.</string> + <key>preset_name</key> + <string>iPod Low-Rez</string> <key>preset_type</key> <integer>0</integer> <key>subtitle_lang</key> @@ -6276,7 +6294,7 @@ R2RrUAAABBgBAQACAAAAQAAAABAAAAAQ////AP///wD///8A////AP///wD///8A////AP///wD///8A <key>x264_options</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> + </array> <key>widget-deps</key> <dict> <key>anamorphic</key> diff --git a/gtk/src/standard_presets.xml b/gtk/src/standard_presets.xml index 37fc524da..5ae60679d 100644 --- a/gtk/src/standard_presets.xml +++ b/gtk/src/standard_presets.xml @@ -1,9 +1,10 @@ <?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>Animation</key> +<array> <dict> + <key>preset_name</key> + <string>Animation</string> <key>anamorphic</key> <true /> <key>autocrop</key> @@ -72,8 +73,9 @@ <key>x264_options</key> <string>ref=5:mixed-refs:bframes=6:bime:weightb:b-rdo:direct=auto:b-pyramid:me=umh:analyse=all:8x8dct:trellis=1:nr=150:no-fast-pskip:filter=2,2</string> </dict> - <key>AppleTV</key> <dict> + <key>preset_name</key> + <string>AppleTV</string> <key>anamorphic</key> <true /> <key>autoscale</key> @@ -152,8 +154,9 @@ <key>x264_options</key> <string>bframes=3:ref=1:me=umh:no-fast-pskip=1:trellis=1:cabac=0</string> </dict> - <key>Bedlam</key> <dict> + <key>preset_name</key> + <string>Bedlam</string> <key>anamorphic</key> <true /> <key>autocrop</key> @@ -222,8 +225,9 @@ <key>x264_options</key> <string>ref=16:mixed-refs:bframes=16:bime:weightb:b-rdo:direct=auto:b-pyramid:me=esa:subme=7:me-range=64:analyse=all:8x8dct:trellis=1:no-fast-pskip:no-dct-decimate:filter=-2,-1</string> </dict> - <key>Blind</key> <dict> + <key>preset_name</key> + <string>Blind</string> <key>anamorphic</key> <false /> <key>autocrop</key> @@ -292,8 +296,9 @@ <key>x264_options</key> <string></string> </dict> - <key>Broke</key> <dict> + <key>preset_name</key> + <string>Broke</string> <key>anamorphic</key> <false /> <key>autocrop</key> @@ -362,8 +367,9 @@ <key>x264_options</key> <string>ref=3:mixed-refs:bframes=16:bime:weightb:b-rdo:b-pyramid:direct=auto:me=umh:trellis=1:analyse=all:8x8dct:no-fast-pskip</string> </dict> - <key>Classic</key> <dict> + <key>preset_name</key> + <string>Classic</string> <key>anamorphic</key> <false /> <key>autocrop</key> @@ -430,8 +436,9 @@ <key>x264_options</key> <string></string> </dict> - <key>Constant Quality Rate</key> <dict> + <key>preset_name</key> + <string>Constant Quality Rate</string> <key>anamorphic</key> <true /> <key>autocrop</key> @@ -500,8 +507,9 @@ <key>x264_options</key> <string>ref=3:mixed-refs:bframes=3:b-pyramid:b-rdo:bime:weightb:filter=-2,-1:trellis=1:analyse=all:8x8dct:me=umh</string> </dict> - <key>Deux Six Quatre</key> <dict> + <key>preset_name</key> + <string>Deux Six Quatre</string> <key>anamorphic</key> <true /> <key>autocrop</key> @@ -570,8 +578,9 @@ <key>x264_options</key> <string>ref=5:mixed-refs:bframes=3:bime:weightb:b-rdo:b-pyramid:me=umh:subme=7:trellis=1:analyse=all:8x8dct:no-fast-pskip</string> </dict> - <key>Film</key> <dict> + <key>preset_name</key> + <string>Film</string> <key>anamorphic</key> <true /> <key>autocrop</key> @@ -640,8 +649,9 @@ <key>x264_options</key> <string>ref=3:mixed-refs:bframes=6:bime:weightb:b-rdo:direct=auto:b-pyramid:me=umh:subme=7:analyse=all:8x8dct:trellis=1:no-fast-pskip</string> </dict> - <key>Normal</key> <dict> + <key>preset_name</key> + <string>Normal</string> <key>anamorphic</key> <true /> <key>autocrop</key> @@ -710,8 +720,9 @@ <key>x264_options</key> <string>ref=2:bframes=2:me=umh</string> </dict> - <key>PS3</key> <dict> + <key>preset_name</key> + <string>PS3</string> <key>anamorphic</key> <true /> <key>autoscale</key> @@ -776,8 +787,9 @@ <key>x264_options</key> <string>level=41:me=umh</string> </dict> - <key>PSP</key> <dict> + <key>preset_name</key> + <string>PSP</string> <key>anamorphic</key> <false /> <key>autocrop</key> @@ -844,8 +856,9 @@ <key>x264_options</key> <string></string> </dict> - <key>QuickTime</key> <dict> + <key>preset_name</key> + <string>QuickTime</string> <key>anamorphic</key> <true /> <key>autocrop</key> @@ -914,8 +927,9 @@ <key>x264_options</key> <string>ref=3:mixed-refs:bframes=3:bime:weightb:b-rdo:direct=auto:me=umh:analyse=all:trellis=1:no-fast-pskip</string> </dict> - <key>Television</key> <dict> + <key>preset_name</key> + <string>Television</string> <key>anamorphic</key> <false /> <key>autocrop</key> @@ -984,8 +998,9 @@ <key>x264_options</key> <string>ref=3:mixed-refs:bframes=6:bime:weightb:direct=auto:b-pyramid:me=umh:analyse=all:8x8dct:trellis=1:nr=150:no-fast-pskip</string> </dict> - <key>Xbox 360</key> <dict> + <key>preset_name</key> + <string>Xbox 360</string> <key>anamorphic</key> <true /> <key>autoscale</key> @@ -1050,8 +1065,9 @@ <key>x264_options</key> <string>level=40:ref=2:mixed-refs:bframes=3:bime:weightb:b-rdo:direct=auto:b-pyramid:me=umh:analyse=all:no-fast-pskip:filter=-2,-1</string> </dict> - <key>iPhone / iPod Touch</key> <dict> + <key>preset_name</key> + <string>iPhone / iPod Touch</string> <key>anamorphic</key> <false /> <key>autocrop</key> @@ -1120,8 +1136,9 @@ <key>x264_options</key> <string>level=30:cabac=0:ref=1:analyse=all:me=umh:no-fast-pskip=1:trellis=1</string> </dict> - <key>iPod High-Rez</key> <dict> + <key>preset_name</key> + <string>iPod High-Rez</string> <key>anamorphic</key> <false /> <key>autocrop</key> @@ -1190,8 +1207,9 @@ <key>x264_options</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> - <key>iPod Low-Rez</key> <dict> + <key>preset_name</key> + <string>iPod Low-Rez</string> <key>anamorphic</key> <false /> <key>autocrop</key> @@ -1260,5 +1278,5 @@ <key>x264_options</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> +</array> </plist> |