MacGui: add Burn-In options to subtitle defaults hopefully similar to the LinGui.
authorritsuka <damiog@gmail.com>
Tue, 17 Feb 2015 17:30:34 +0000 (17:30 +0000)
committerritsuka <damiog@gmail.com>
Tue, 17 Feb 2015 17:30:34 +0000 (17:30 +0000)
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6916 b64f7644-9d1e-0410-96f1-a4d463321fa5

macosx/English.lproj/SubtitlesDefaults.xib
macosx/HBSubtitles.m
macosx/HBSubtitlesDefaults.h
macosx/HBSubtitlesDefaults.m

index dcf8fc835eefe94d4922b6bb1f1d7f1daee82367..b6c1b3c7b04a3a2571c06401167d3afef6b2268b 100644 (file)
@@ -1,8 +1,8 @@
 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="6724" systemVersion="14C106a" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none">
+<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="7515.2" systemVersion="14D72i" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none">
     <dependencies>
         <deployment version="1060" identifier="macosx"/>
-        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="6724"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="7515.2"/>
     </dependencies>
     <objects>
         <customObject id="-2" userLabel="File's Owner" customClass="HBSubtitlesDefaultsController">
         <window title="Window" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" restorable="NO" showsToolbarButton="NO" visibleAtLaunch="NO" animationBehavior="default" id="kwM-lz-5lG">
             <windowStyleMask key="styleMask" titled="YES" closable="YES" miniaturizable="YES" resizable="YES"/>
             <windowPositionMask key="initialPositionMask" leftStrut="YES" rightStrut="YES" topStrut="YES" bottomStrut="YES"/>
-            <rect key="contentRect" x="283" y="305" width="427" height="304"/>
+            <rect key="contentRect" x="283" y="305" width="427" height="409"/>
             <rect key="screenRect" x="0.0" y="0.0" width="2560" height="1418"/>
             <value key="minSize" type="size" width="427" height="304"/>
             <value key="maxSize" type="size" width="427" height="1000"/>
             <view key="contentView" id="ZP2-Cp-K5w">
-                <rect key="frame" x="0.0" y="0.0" width="427" height="304"/>
+                <rect key="frame" x="0.0" y="5" width="427" height="409"/>
                 <autoresizingMask key="autoresizingMask"/>
                 <subviews>
                     <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" id="fPg-3n-1TN">
-                        <rect key="frame" x="-2" y="268" width="157" height="14"/>
+                        <rect key="frame" x="-2" y="373" width="157" height="14"/>
                         <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
                         <textFieldCell key="cell" controlSize="small" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" alignment="right" title="Track Selection Behavior:" id="GbM-vm-RC2">
                             <font key="font" metaFont="smallSystem"/>
@@ -35,7 +35,7 @@
                         </textFieldCell>
                     </textField>
                     <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" id="Jsz-Er-bsF">
-                        <rect key="frame" x="-2" y="244" width="157" height="14"/>
+                        <rect key="frame" x="-2" y="349" width="157" height="14"/>
                         <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
                         <textFieldCell key="cell" controlSize="small" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" alignment="right" title="Languages:" id="mAT-Jp-SG1">
                             <font key="font" metaFont="smallSystem"/>
@@ -44,7 +44,7 @@
                         </textFieldCell>
                     </textField>
                     <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" id="Hqz-Lw-gAu">
-                        <rect key="frame" x="-2" y="66" width="157" height="14"/>
+                        <rect key="frame" x="-2" y="171" width="157" height="14"/>
                         <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
                         <textFieldCell key="cell" controlSize="small" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" alignment="right" title="Options:" id="NJl-q3-zXL">
                             <font key="font" metaFont="smallSystem"/>
@@ -53,7 +53,7 @@
                         </textFieldCell>
                     </textField>
                     <popUpButton verticalHuggingPriority="750" id="oiD-QI-wly">
-                        <rect key="frame" x="158" y="263" width="252" height="22"/>
+                        <rect key="frame" x="158" y="368" width="252" height="22"/>
                         <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
                         <popUpButtonCell key="cell" type="push" title="None" bezelStyle="rounded" alignment="left" controlSize="small" lineBreakMode="truncatingTail" state="on" borderStyle="borderAndBezel" imageScaling="proportionallyDown" inset="2" selectedItem="mvw-Hg-JFM" id="21e-KY-8TR">
                             <behavior key="behavior" lightByBackground="YES" lightByGray="YES"/>
                                 </items>
                             </menu>
                         </popUpButtonCell>
+                        <accessibility description="Track Selection Behavior:"/>
                         <connections>
                             <binding destination="-2" name="selectedIndex" keyPath="self.settings.trackSelectionBehavior" id="sKn-Mr-Hce"/>
                         </connections>
                     </popUpButton>
                     <button toolTip="Closed captions are text subtitles that can be added to any container as a soft subtitle track (not burned)." id="uF5-6E-EIe">
-                        <rect key="frame" x="158" y="63" width="251" height="18"/>
+                        <rect key="frame" x="158" y="168" width="251" height="18"/>
                         <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
                         <buttonCell key="cell" type="check" title="Add Closed Captions when available" bezelStyle="regularSquare" imagePosition="left" controlSize="small" state="on" inset="2" id="66v-2g-DHn">
                             <behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
@@ -82,7 +83,7 @@
                         </connections>
                     </button>
                     <button toolTip="This search pass finds short sequences of foreign audio and provides subtitles for them." id="OOC-GZ-OFA">
-                        <rect key="frame" x="158" y="45" width="251" height="18"/>
+                        <rect key="frame" x="158" y="150" width="251" height="18"/>
                         <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
                         <buttonCell key="cell" type="check" title="Add &quot;Foreign Audio Search&quot;" bezelStyle="regularSquare" imagePosition="left" controlSize="small" state="on" inset="2" id="vNY-OC-hTJ">
                             <behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
@@ -93,7 +94,7 @@
                         </connections>
                     </button>
                     <scrollView autohidesScrollers="YES" horizontalLineScroll="16" horizontalPageScroll="10" verticalLineScroll="16" verticalPageScroll="10" usesPredominantAxisScrolling="NO" id="aTC-39-h6S">
-                        <rect key="frame" x="161" y="123" width="246" height="135"/>
+                        <rect key="frame" x="161" y="228" width="246" height="135"/>
                         <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                         <clipView key="contentView" id="TdE-Sh-NcS">
                             <rect key="frame" x="1" y="1" width="244" height="133"/>
                                     <rect key="frame" x="0.0" y="0.0" width="236" height="16"/>
                                     <autoresizingMask key="autoresizingMask"/>
                                     <size key="intercellSpacing" width="3" height="2"/>
-                                    <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
+                                    <color key="backgroundColor" name="controlBackgroundColor" catalog="System" colorSpace="catalog"/>
                                     <color key="gridColor" name="gridColor" catalog="System" colorSpace="catalog"/>
                                     <tableColumns>
                                         <tableColumn identifier="checkBox" width="20" minWidth="20" maxWidth="20" id="G44-XP-6xE">
                         </scroller>
                     </scrollView>
                     <button verticalHuggingPriority="750" id="QAt-5X-NBT">
-                        <rect key="frame" x="161" y="93" width="71" height="23"/>
+                        <rect key="frame" x="161" y="198" width="71" height="23"/>
                         <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
                         <buttonCell key="cell" type="smallSquare" title="Show All" bezelStyle="smallSquare" imagePosition="overlaps" alignment="center" controlSize="small" borderStyle="border" inset="3" id="PiQ-bA-7P1">
                             <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES" changeBackground="YES" changeGray="YES"/>
                             <action selector="edit:" target="-2" id="13y-nD-hEj"/>
                         </connections>
                     </button>
+                    <popUpButton verticalHuggingPriority="750" id="Lsa-kB-2BP">
+                        <rect key="frame" x="158" y="117" width="252" height="22"/>
+                        <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+                        <string key="toolTip">Set the behavior of subtitle "Burn-in"
+
+Burned-In subtitles are part of the video and can not be disabled during playback.
+Only one subtitle track can be burned. Since conflics can occur, the first chosen wins.</string>
+                        <popUpButtonCell key="cell" type="push" title="None" bezelStyle="rounded" alignment="left" controlSize="small" lineBreakMode="truncatingTail" state="on" borderStyle="borderAndBezel" imageScaling="proportionallyDown" inset="2" selectedItem="ej8-4k-1vd" id="vJS-B5-ELJ">
+                            <behavior key="behavior" lightByBackground="YES" lightByGray="YES"/>
+                            <font key="font" metaFont="smallSystem"/>
+                            <menu key="menu" id="WrT-aW-kW1">
+                                <items>
+                                    <menuItem title="None" state="on" id="ej8-4k-1vd"/>
+                                    <menuItem title="Foreign Audio Subtitles Track" id="QRd-XH-6TH"/>
+                                    <menuItem title="First Selected Track" id="mnl-P8-dtK"/>
+                                    <menuItem title="Foreign Audio, the First Selected Track" id="d79-2j-fhc"/>
+                                </items>
+                            </menu>
+                        </popUpButtonCell>
+                        <accessibility description="Burn-In Behavior:"/>
+                        <connections>
+                            <binding destination="-2" name="selectedIndex" keyPath="self.settings.burnInBehavior" id="VvM-Ka-msm"/>
+                        </connections>
+                    </popUpButton>
+                    <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" id="qAf-lQ-GN4">
+                        <rect key="frame" x="-2" y="122" width="157" height="14"/>
+                        <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+                        <textFieldCell key="cell" controlSize="small" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" alignment="right" title="Burn-In Behavior:" id="640-NB-Uby">
+                            <font key="font" metaFont="smallSystem"/>
+                            <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
+                            <color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
+                        </textFieldCell>
+                    </textField>
+                    <button id="ceZ-On-t5S">
+                        <rect key="frame" x="158" y="97" width="96" height="18"/>
+                        <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+                        <string key="toolTip">Burn the first selected DVD subtitle track. All other DVD subtitle tracks will be discarded. Use this option if your player software or device does not support DVD Subtitles.
+
+Only one subtitle track can be burned. Since conflics can occur, the first chosen wins.</string>
+                        <buttonCell key="cell" type="check" title="DVD Subtitles" bezelStyle="regularSquare" imagePosition="left" controlSize="small" state="on" inset="2" id="69Q-xB-Vyq">
+                            <behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
+                            <font key="font" metaFont="smallSystem"/>
+                        </buttonCell>
+                        <connections>
+                            <binding destination="-2" name="value" keyPath="self.settings.burnInDVDSubtitles" id="JoG-RB-CFT"/>
+                        </connections>
+                    </button>
+                    <button id="Px8-G6-NVX">
+                        <rect key="frame" x="158" y="79" width="110" height="18"/>
+                        <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+                        <string key="toolTip">Burn the first selected Blu-ray subtitle track. All other Blu-ray subtitle tracks will be discarded. Use this option if your player software or device does not support Blu-ray Subtitles.
+
+Only one subtitle track can be burned. Since conflics can occur, the first chosen wins.</string>
+                        <buttonCell key="cell" type="check" title="Blu-ray Subtitles" bezelStyle="regularSquare" imagePosition="left" controlSize="small" state="on" inset="2" id="bfV-9D-6dh">
+                            <behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
+                            <font key="font" metaFont="smallSystem"/>
+                        </buttonCell>
+                        <connections>
+                            <binding destination="-2" name="value" keyPath="self.settings.burnInBluraySubtitles" id="bZK-Kf-z6W"/>
+                        </connections>
+                    </button>
+                    <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" setsMaxLayoutWidthAtFirstLayout="YES" id="MlS-tB-pEv">
+                        <rect key="frame" x="159" y="46" width="250" height="28"/>
+                        <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+                        <textFieldCell key="cell" controlSize="small" sendsActionOnEndEditing="YES" title="Only one of the above subtitle burn options will be applied, starting with the top." id="N4s-K9-RwM">
+                            <font key="font" metaFont="smallSystem"/>
+                            <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
+                            <color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
+                        </textFieldCell>
+                    </textField>
                     <button verticalHuggingPriority="750" id="sC2-52-liU">
-                        <rect key="frame" x="358" y="14" width="54" height="28"/>
+                        <rect key="frame" x="363" y="14" width="54" height="28"/>
                         <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxY="YES"/>
                         <buttonCell key="cell" type="push" title="Done" bezelStyle="rounded" alignment="center" controlSize="small" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="kDe-1L-VkD">
                             <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
@@ -182,7 +253,7 @@ DQ
                     </button>
                 </subviews>
             </view>
-            <point key="canvasLocation" x="380.5" y="287"/>
+            <point key="canvasLocation" x="302.5" y="103.5"/>
         </window>
         <arrayController objectClassName="HBLang" id="ZBe-aP-wvq" userLabel="Table Controller" customClass="HBLanguageArrayController">
             <declaredKeys>
index 82eceb963d6bbe7c1af31eabf20336efb7eceac3..a8fed1cae03af3c71999d615b09a7a8276d64443 100644 (file)
@@ -306,9 +306,63 @@ NSString *keySubTrackLanguageIndex = @"keySubTrackLanguageIndex";
         }
     }
 
+    // Set the burn key for the appropriate track.
+    if (self.defaults.burnInBehavior != HBSubtitleTrackBurnInBehaviorNone && self.tracks.count)
+    {
+        if (self.defaults.burnInBehavior == HBSubtitleTrackBurnInBehaviorFirst)
+        {
+            if ([self.tracks.firstObject[keySubTrackIndex] integerValue] != -1)
+            {
+                self.tracks.firstObject[keySubTrackBurned] = @YES;
+            }
+            else if (self.tracks.count > 1)
+            {
+                self.tracks[1][keySubTrackBurned] = @YES;
+            }
+        }
+        else if (self.defaults.burnInBehavior == HBSubtitleTrackBurnInBehaviorForeignAudio)
+        {
+            if ([self.tracks.firstObject[keySubTrackIndex] integerValue] == -1)
+            {
+                self.tracks.firstObject[keySubTrackBurned] = @YES;
+            }
+        }
+        else if (self.defaults.burnInBehavior == HBSubtitleTrackBurnInBehaviorForeignAudioThenFirst)
+        {
+            self.tracks.firstObject[keySubTrackBurned] = @YES;
+        }
+    }
+
+    // Burn-in the first dvd or bluray track and remove the others.
+    if (self.defaults.burnInDVDSubtitles || self.defaults.burnInBluraySubtitles)
+    {
+        // Ugly settings for ugly players
+        BOOL bitmapSubtitlesFound = NO;
+
+        NSMutableArray *tracksToDelete = [[NSMutableArray alloc] init];
+        for (NSMutableDictionary *track in self.tracks)
+        {
+            if ([track[keySubTrackIndex] integerValue] != -1)
+            {
+                if ((([track[keySubTrackType] intValue] == VOBSUB && self.defaults.burnInDVDSubtitles) ||
+                     ([track[keySubTrackType] intValue] == PGSSUB && self.defaults.burnInBluraySubtitles)) &&
+                    !bitmapSubtitlesFound)
+                {
+                    track[keySubTrackBurned] = @YES;
+                    bitmapSubtitlesFound = YES;
+                }
+                else if ([track[keySubTrackType] intValue] == VOBSUB || [track[keySubTrackType] intValue] == PGSSUB)
+                {
+                    [tracksToDelete addObject:track];
+                }
+            }
+        }
+        [self.tracks removeObjectsInArray:tracksToDelete];
+        [tracksToDelete release];
+    }
+
     // Add an empty track
     [self insertObject:[self createSubtitleTrack] inTracksAtIndex:[self countOfTracks]];
-
     [self validatePassthru];
 }
 
@@ -318,7 +372,6 @@ NSString *keySubTrackLanguageIndex = @"keySubTrackLanguageIndex";
  */
 - (void)validatePassthru
 {
-    int subtitleTrackType;
     BOOL convertToBurnInUsed = NO;
     NSMutableArray *tracksToDelete = [[NSMutableArray alloc] init];
 
@@ -330,7 +383,7 @@ NSString *keySubTrackLanguageIndex = @"keySubTrackLanguageIndex";
             continue;
         }
 
-        subtitleTrackType = [track[keySubTrackType] intValue];
+        int subtitleTrackType = [track[keySubTrackType] intValue];
         if (!hb_subtitle_can_pass(subtitleTrackType, self.container))
         {
             if (convertToBurnInUsed == NO)
@@ -356,7 +409,7 @@ NSString *keySubTrackLanguageIndex = @"keySubTrackLanguageIndex";
                 continue;
             }
 
-            subtitleTrackType = [track[keySubTrackType] intValue];
+            int subtitleTrackType = [track[keySubTrackType] intValue];
             if (hb_subtitle_can_pass(subtitleTrackType, self.container))
             {
                 track[keySubTrackBurned] = @0;
index ab65a20b300ef61e330fe9a813086393da3a1b32..793e31d3ae7321f4868119d074ebf49d7340bba9 100644 (file)
@@ -13,6 +13,13 @@ typedef NS_ENUM(NSUInteger, HBSubtitleTrackSelectionBehavior) {
     HBSubtitleTrackSelectionBehaviorAll,
 };
 
+typedef NS_ENUM(NSUInteger, HBSubtitleTrackBurnInBehavior) {
+    HBSubtitleTrackBurnInBehaviorNone,
+    HBSubtitleTrackBurnInBehaviorForeignAudio,
+    HBSubtitleTrackBurnInBehaviorFirst,
+    HBSubtitleTrackBurnInBehaviorForeignAudioThenFirst,
+};
+
 @interface HBSubtitlesDefaults : NSObject <NSCoding, NSCopying, HBPresetCoding>
 
 @property (nonatomic, readwrite) HBSubtitleTrackSelectionBehavior trackSelectionBehavior;
@@ -22,4 +29,8 @@ typedef NS_ENUM(NSUInteger, HBSubtitleTrackSelectionBehavior) {
 @property (nonatomic, readwrite) BOOL addForeignAudioSubtitle;
 @property (nonatomic, readwrite) BOOL addCC;
 
+@property (nonatomic, readwrite) HBSubtitleTrackBurnInBehavior burnInBehavior;
+@property (nonatomic, readwrite) BOOL burnInDVDSubtitles;
+@property (nonatomic, readwrite) BOOL burnInBluraySubtitles;
+
 @end
index 359b19ea22003f45edda944e862ba2b0111e04e6..02d9cc3457688e975bf7c750642a04e7aa8c8c5d 100644 (file)
     self.addCC = [preset[@"SubtitleAddCC"] boolValue];
     self.addForeignAudioSearch = [preset[@"SubtitleAddForeignAudioSearch"] boolValue];
     self.addForeignAudioSubtitle = [preset[@"SubtitleAddForeignAudioSubtitle"] boolValue];
+
+    NSString *burnInBehavior = preset[@"SubtitleBurnBehavior"];
+
+    if ([burnInBehavior isEqualToString:@"foreign"])
+    {
+        self.burnInBehavior = HBSubtitleTrackBurnInBehaviorForeignAudio;
+    }
+    else if ([burnInBehavior isEqualToString:@"fist"])
+    {
+        self.burnInBehavior = HBSubtitleTrackBurnInBehaviorFirst;
+    }
+    else if ([burnInBehavior isEqualToString:@"foreign_first"])
+    {
+        self.burnInBehavior = HBSubtitleTrackBurnInBehaviorForeignAudioThenFirst;
+    }
+    else
+    {
+        self.burnInBehavior = HBSubtitleTrackBurnInBehaviorNone;
+    }
+
+    self.burnInDVDSubtitles = [preset[@"SubtitleBurnDVDSub"] boolValue];
+    self.burnInBluraySubtitles = [preset[@"SubtitleBurnBDSub"] boolValue];
 }
 
 - (void)writeToPreset:(NSMutableDictionary *)preset
     preset[@"SubtitleAddCC"] = @(self.addCC);
     preset[@"SubtitleAddForeignAudioSearch"] = @(self.addForeignAudioSearch);
     preset[@"SubtitleAddForeignAudioSubtitle"] = @(self.addForeignAudioSubtitle);
+
+    if (self.burnInBehavior == HBSubtitleTrackBurnInBehaviorForeignAudio)
+    {
+        preset[@"SubtitleBurnBehavior"] = @"foreign";
+    }
+    else if (self.burnInBehavior == HBSubtitleTrackBurnInBehaviorFirst)
+    {
+        preset[@"SubtitleBurnBehavior"] = @"fist";
+    }
+    else if (self.burnInBehavior == HBSubtitleTrackBurnInBehaviorForeignAudioThenFirst)
+    {
+        preset[@"SubtitleBurnBehavior"] = @"foreign_first";
+    }
+    else
+    {
+        preset[@"SubtitleBurnBehavior"] = @"none";
+    }
+
+    preset[@"SubtitleBurnDVDSub"] = @(self.burnInDVDSubtitles);
+    preset[@"SubtitleBurnBDSub"] = @(self.burnInBluraySubtitles);
 }
 
 #pragma mark - NSCopying
         copy->_addForeignAudioSearch = _addForeignAudioSearch;
         copy->_addForeignAudioSubtitle = _addForeignAudioSubtitle;
         copy->_addCC = _addCC;
+
+        copy->_burnInBehavior = _burnInBehavior;
+        copy->_burnInDVDSubtitles = _burnInDVDSubtitles;
+        copy->_burnInBluraySubtitles = _burnInBluraySubtitles;
     }
-    
+
     return copy;
 }
 
 
 - (void)encodeWithCoder:(NSCoder *)coder
 {
-    [coder encodeInt:1 forKey:@"HBAudioDefaultsVersion"];
+    [coder encodeInt:1 forKey:@"HBSubtitlesDefaultsVersion"];
 
     encodeInteger(_trackSelectionBehavior);
     encodeObject(_trackSelectionLanguages);
     encodeBool(_addForeignAudioSearch);
     encodeBool(_addForeignAudioSubtitle);
     encodeBool(_addCC);
+
+    encodeInteger(_burnInBehavior);
+    encodeBool(_burnInDVDSubtitles);
+    encodeBool(_burnInBluraySubtitles);
 }
 
 - (id)initWithCoder:(NSCoder *)decoder
     decodeBool(_addForeignAudioSubtitle);
     decodeBool(_addCC);
 
+    decodeInteger(_burnInBehavior);
+    decodeBool(_burnInDVDSubtitles);
+    decodeBool(_burnInBluraySubtitles);
+
     return self;
 }