diff options
33 files changed, 2269 insertions, 691 deletions
diff --git a/macosx/Base.lproj/MainWindow.xib b/macosx/Base.lproj/MainWindow.xib index d691c3cb5..f07c042c1 100644 --- a/macosx/Base.lproj/MainWindow.xib +++ b/macosx/Base.lproj/MainWindow.xib @@ -1,8 +1,8 @@ <?xml version="1.0" encoding="UTF-8"?> -<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="14490.70" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES"> +<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="16096" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES"> <dependencies> <deployment identifier="macosx"/> - <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="14490.70"/> + <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="16096"/> <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> </dependencies> <objects> @@ -14,7 +14,6 @@ <outlet property="fFiltersTab" destination="0UB-bG-kwS" id="9at-ML-tDd"/> <outlet property="fMainTabView" destination="1474" id="sl5-BZ-ymC"/> <outlet property="fPictureTab" destination="eij-Sn-QmJ" id="Ccp-rO-nqD"/> - <outlet property="fRipIndicator" destination="1373" id="an5-ng-etT"/> <outlet property="fScanHorizontalLine" destination="3205" id="W26-Wu-2YJ"/> <outlet property="fScanIndicator" destination="3203" id="cG1-SY-gbt"/> <outlet property="fSrcDVD2Field" destination="1539" id="pxg-Wl-Mn7"/> @@ -40,20 +39,20 @@ <windowCollectionBehavior key="collectionBehavior" fullScreenPrimary="YES"/> <windowPositionMask key="initialPositionMask" leftStrut="YES" rightStrut="YES" topStrut="YES" bottomStrut="YES"/> <rect key="contentRect" x="41" y="572" width="885" height="600"/> - <rect key="screenRect" x="0.0" y="0.0" width="1920" height="1177"/> + <rect key="screenRect" x="0.0" y="0.0" width="1920" height="1057"/> <view key="contentView" id="2" customClass="HBFocusRingView"> <rect key="frame" x="0.0" y="0.0" width="885" height="600"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> <subviews> <tabView controlSize="small" translatesAutoresizingMaskIntoConstraints="NO" id="1474"> - <rect key="frame" x="13" y="116" width="859" height="382"/> + <rect key="frame" x="13" y="87" width="859" height="411"/> <constraints> <constraint firstAttribute="height" relation="greaterThanOrEqual" constant="334" id="Jdl-tV-liS"/> </constraints> <tabViewItems> <tabViewItem label="Summary" identifier="" id="BA0-eg-2Ka"> <view key="view" id="BjX-E2-6tb"> - <rect key="frame" x="10" y="29" width="839" height="340"/> + <rect key="frame" x="10" y="25" width="839" height="373"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> </view> </tabViewItem> @@ -108,7 +107,7 @@ </connections> </textField> <textField horizontalHuggingPriority="1000" verticalHuggingPriority="750" allowsCharacterPickerTouchBarItem="YES" preferredMaxLayoutWidth="100" translatesAutoresizingMaskIntoConstraints="NO" id="1540"> - <rect key="frame" x="18" y="540" width="33" height="14"/> + <rect key="frame" x="18" y="541" width="34" height="14"/> <textFieldCell key="cell" controlSize="small" sendsActionOnEndEditing="YES" alignment="left" title="Title:" id="4907"> <font key="font" metaFont="smallSystemBold"/> <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/> @@ -125,7 +124,7 @@ </constraints> <popUpButtonCell key="cell" type="push" bezelStyle="rounded" alignment="left" controlSize="small" lineBreakMode="clipping" borderStyle="borderAndBezel" inset="2" arrowPosition="arrowAtCenter" preferredEdge="maxY" id="5514"> <behavior key="behavior" lightByBackground="YES" lightByGray="YES"/> - <font key="font" metaFont="smallSystem"/> + <font key="font" metaFont="message" size="11"/> <menu key="menu" title="OtherViews" id="5515"/> </popUpButtonCell> <accessibility description="Range Selection"/> @@ -141,7 +140,7 @@ </connections> </popUpButton> <textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" allowsCharacterPickerTouchBarItem="YES" preferredMaxLayoutWidth="100" translatesAutoresizingMaskIntoConstraints="NO" id="1552"> - <rect key="frame" x="18" y="94" width="52" height="14"/> + <rect key="frame" x="18" y="64" width="52" height="14"/> <textFieldCell key="cell" sendsActionOnEndEditing="YES" alignment="left" title="Save As:" id="4913"> <font key="font" metaFont="smallSystemBold"/> <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/> @@ -152,7 +151,7 @@ </connections> </textField> <textField horizontalHuggingPriority="1000" verticalHuggingPriority="750" allowsCharacterPickerTouchBarItem="YES" preferredMaxLayoutWidth="100" translatesAutoresizingMaskIntoConstraints="NO" id="1553"> - <rect key="frame" x="754" y="540" width="57" height="14"/> + <rect key="frame" x="754" y="541" width="57" height="14"/> <textFieldCell key="cell" controlSize="small" sendsActionOnEndEditing="YES" alignment="left" title="Duration:" id="4914"> <font key="font" metaFont="smallSystemBold"/> <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/> @@ -167,12 +166,12 @@ </connections> </textField> <textField toolTip="Duration of the selected source range in Hours:Minutes:Seconds." verticalHuggingPriority="750" allowsCharacterPickerTouchBarItem="YES" preferredMaxLayoutWidth="100" translatesAutoresizingMaskIntoConstraints="NO" id="1554"> - <rect key="frame" x="811" y="540" width="56" height="14"/> + <rect key="frame" x="811" y="541" width="56" height="14"/> <constraints> <constraint firstAttribute="width" constant="52" id="YAI-9M-gNt"/> </constraints> <textFieldCell key="cell" controlSize="small" selectable="YES" sendsActionOnEndEditing="YES" alignment="left" title="00:00:00" id="4915"> - <font key="font" metaFont="smallSystem"/> + <font key="font" metaFont="message" size="11"/> <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/> <color key="backgroundColor" red="0.76630436999999996" green="0.0" blue="0.0" alpha="0.0" colorSpace="calibratedRGB"/> </textFieldCell> @@ -193,7 +192,7 @@ <constraint firstAttribute="width" relation="greaterThanOrEqual" constant="40" id="xNw-RS-Hhf"/> </constraints> <textFieldCell key="cell" controlSize="small" scrollable="YES" lineBreakMode="clipping" selectable="YES" sendsActionOnEndEditing="YES" alignment="left" usesSingleLineMode="YES" id="4906"> - <font key="font" metaFont="smallSystem"/> + <font key="font" metaFont="message" size="11"/> <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/> <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="calibratedRGB"/> </textFieldCell> @@ -202,9 +201,9 @@ </connections> </textField> <textField toolTip="File name. This is what your new video will be named." verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" textCompletion="NO" translatesAutoresizingMaskIntoConstraints="NO" id="1561"> - <rect key="frame" x="76" y="91" width="347" height="19"/> + <rect key="frame" x="76" y="62" width="347" height="19"/> <textFieldCell key="cell" controlSize="small" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" continuous="YES" sendsActionOnEndEditing="YES" state="on" borderStyle="bezel" alignment="left" drawsBackground="YES" id="4919"> - <font key="font" metaFont="smallSystem"/> + <font key="font" metaFont="message" size="11"/> <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/> <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/> </textFieldCell> @@ -223,9 +222,9 @@ </connections> </textField> <textField hidden="YES" toolTip="First second to encode." verticalHuggingPriority="750" allowsCharacterPickerTouchBarItem="YES" translatesAutoresizingMaskIntoConstraints="NO" id="5491" userLabel="Time Start Encoding Field"> - <rect key="frame" x="607" y="537" width="58" height="19"/> + <rect key="frame" x="607" y="539" width="58" height="19"/> <textFieldCell key="cell" controlSize="small" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" state="on" borderStyle="bezel" alignment="right" drawsBackground="YES" id="5492"> - <font key="font" metaFont="smallSystem"/> + <font key="font" metaFont="message" size="11"/> <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/> <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/> </textFieldCell> @@ -246,12 +245,12 @@ </connections> </textField> <textField hidden="YES" toolTip="First frame to encode." verticalHuggingPriority="750" allowsCharacterPickerTouchBarItem="YES" translatesAutoresizingMaskIntoConstraints="NO" id="5521" userLabel="Frame Start Encoding Field"> - <rect key="frame" x="607" y="537" width="58" height="19"/> + <rect key="frame" x="607" y="539" width="58" height="19"/> <textFieldCell key="cell" controlSize="small" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" state="on" borderStyle="bezel" alignment="right" drawsBackground="YES" id="5522"> <numberFormatter key="formatter" formatterBehavior="default10_4" usesGroupingSeparator="NO" minimumIntegerDigits="0" maximumIntegerDigits="42" id="Wpt-92-R1O"> <real key="minimum" value="0.0"/> </numberFormatter> - <font key="font" metaFont="smallSystem"/> + <font key="font" metaFont="message" size="11"/> <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/> <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/> </textFieldCell> @@ -271,9 +270,9 @@ </connections> </textField> <textField hidden="YES" toolTip="Last second to encode." verticalHuggingPriority="750" allowsCharacterPickerTouchBarItem="YES" translatesAutoresizingMaskIntoConstraints="NO" id="5493" userLabel="Time End Encoding Field"> - <rect key="frame" x="683" y="537" width="58" height="19"/> + <rect key="frame" x="683" y="539" width="58" height="19"/> <textFieldCell key="cell" controlSize="small" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" state="on" borderStyle="bezel" alignment="left" drawsBackground="YES" id="5494"> - <font key="font" metaFont="smallSystem"/> + <font key="font" metaFont="message" size="11"/> <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/> <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/> </textFieldCell> @@ -294,12 +293,12 @@ </connections> </textField> <textField hidden="YES" toolTip="Last frame to encode." verticalHuggingPriority="750" allowsCharacterPickerTouchBarItem="YES" translatesAutoresizingMaskIntoConstraints="NO" id="5523" userLabel="Frame End Encoding Field"> - <rect key="frame" x="683" y="537" width="58" height="19"/> + <rect key="frame" x="683" y="539" width="58" height="19"/> <textFieldCell key="cell" controlSize="small" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" state="on" borderStyle="bezel" alignment="left" drawsBackground="YES" id="5524"> <numberFormatter key="formatter" formatterBehavior="default10_4" usesGroupingSeparator="NO" minimumIntegerDigits="0" maximumIntegerDigits="42" id="WrK-kN-ZN0"> <real key="minimum" value="0.0"/> </numberFormatter> - <font key="font" metaFont="smallSystem"/> + <font key="font" metaFont="message" size="11"/> <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/> <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/> </textFieldCell> @@ -345,12 +344,12 @@ </constraints> </progressIndicator> <textField verticalHuggingPriority="750" allowsCharacterPickerTouchBarItem="YES" preferredMaxLayoutWidth="100" translatesAutoresizingMaskIntoConstraints="NO" id="5505"> - <rect key="frame" x="667" y="540" width="14" height="14"/> + <rect key="frame" x="667" y="541" width="14" height="14"/> <constraints> <constraint firstAttribute="width" constant="10" id="oZA-uv-S2L"/> </constraints> <textFieldCell key="cell" sendsActionOnEndEditing="YES" alignment="center" title="–" id="5506"> - <font key="font" metaFont="smallSystem"/> + <font key="font" metaFont="message" size="11"/> <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/> <color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/> </textFieldCell> @@ -369,7 +368,7 @@ </constraints> <popUpButtonCell key="cell" type="push" bezelStyle="rounded" alignment="left" controlSize="small" lineBreakMode="clipping" state="on" borderStyle="borderAndBezel" inset="2" arrowPosition="arrowAtCenter" preferredEdge="maxY" selectedItem="1547" id="4910"> <behavior key="behavior" lightByBackground="YES" lightByGray="YES"/> - <font key="font" metaFont="smallSystem"/> + <font key="font" metaFont="message" size="11"/> <menu key="menu" title="OtherViews" id="1546"> <items> <menuItem state="on" id="1547"/> @@ -394,7 +393,7 @@ </constraints> <popUpButtonCell key="cell" type="push" bezelStyle="rounded" alignment="left" controlSize="small" lineBreakMode="clipping" state="on" borderStyle="borderAndBezel" inset="2" arrowPosition="arrowAtCenter" preferredEdge="maxY" selectedItem="1550" id="4911"> <behavior key="behavior" lightByBackground="YES" lightByGray="YES"/> - <font key="font" metaFont="smallSystem"/> + <font key="font" metaFont="message" size="11"/> <menu key="menu" title="OtherViews" id="1549"> <items> <menuItem state="on" id="1550"/> @@ -419,7 +418,7 @@ </constraints> <popUpButtonCell key="cell" type="push" bezelStyle="rounded" alignment="left" controlSize="small" lineBreakMode="clipping" state="on" borderStyle="borderAndBezel" inset="2" arrowPosition="arrowAtCenter" preferredEdge="maxY" selectedItem="5184" id="5182"> <behavior key="behavior" lightByBackground="YES" lightByGray="YES"/> - <font key="font" metaFont="smallSystem"/> + <font key="font" metaFont="message" size="11"/> <menu key="menu" title="OtherViews" id="5183"> <items> <menuItem state="on" id="5184"/> @@ -449,7 +448,7 @@ IA </connections> </popUpButton> <popUpButton horizontalHuggingPriority="251" verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" translatesAutoresizingMaskIntoConstraints="NO" id="1541"> - <rect key="frame" x="54" y="536" width="310" height="22"/> + <rect key="frame" x="55" y="536" width="309" height="22"/> <string key="toolTip">Title, or video clip, to encode. The longest title is selected by default. Blu-ray and DVD sources often have multiple titles, the longest of which is typically the main feature.</string> @@ -458,7 +457,7 @@ Blu-ray and DVD sources often have multiple titles, the longest of which is typi </constraints> <popUpButtonCell key="cell" type="push" bezelStyle="rounded" alignment="left" controlSize="small" lineBreakMode="clipping" borderStyle="borderAndBezel" inset="2" arrowPosition="arrowAtCenter" preferredEdge="maxY" id="4908"> <behavior key="behavior" lightByBackground="YES" lightByGray="YES"/> - <font key="font" metaFont="smallSystem"/> + <font key="font" metaFont="message" size="11"/> <menu key="menu" title="OtherViews" id="1542"/> <connections> <accessibilityConnection property="title" destination="1540" id="8YI-Kk-J0w"/> @@ -475,12 +474,12 @@ Blu-ray and DVD sources often have multiple titles, the longest of which is typi </connections> </popUpButton> <pathControl verticalHuggingPriority="750" allowsExpansionToolTips="YES" translatesAutoresizingMaskIntoConstraints="NO" id="PJi-21-hie"> - <rect key="frame" x="471" y="91" width="328" height="20"/> + <rect key="frame" x="471" y="61" width="328" height="20"/> <constraints> <constraint firstAttribute="width" constant="328" id="Q5R-FC-z1x"/> </constraints> <pathCell key="cell" controlSize="small" selectable="YES" alignment="left" id="5Bk-66-HFW"> - <font key="font" metaFont="smallSystem"/> + <font key="font" metaFont="message" size="11"/> <url key="url" string="file://localhost/Applications/"/> </pathCell> <accessibility description="Destination folder path"/> @@ -489,10 +488,10 @@ Blu-ray and DVD sources often have multiple titles, the longest of which is typi </connections> </pathControl> <button toolTip="Browse to select a new destination path for your encode." horizontalHuggingPriority="1000" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="1562"> - <rect key="frame" x="796" y="86" width="74" height="27"/> + <rect key="frame" x="796" y="56" width="74" height="27"/> <buttonCell key="cell" type="push" title="Browse…" bezelStyle="rounded" alignment="center" controlSize="small" borderStyle="border" inset="2" id="4920"> <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/> - <font key="font" metaFont="smallSystem"/> + <font key="font" metaFont="message" size="11"/> </buttonCell> <accessibility description="Browse Destination"/> <connections> @@ -505,7 +504,7 @@ Blu-ray and DVD sources often have multiple titles, the longest of which is typi </connections> </button> <textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" allowsCharacterPickerTouchBarItem="YES" preferredMaxLayoutWidth="50" translatesAutoresizingMaskIntoConstraints="NO" id="gfs-4j-YSE"> - <rect key="frame" x="441" y="94" width="22" height="14"/> + <rect key="frame" x="441" y="64" width="22" height="14"/> <textFieldCell key="cell" sendsActionOnEndEditing="YES" alignment="left" title="To:" id="rfK-nQ-Aq2"> <font key="font" metaFont="smallSystemBold"/> <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/> @@ -516,38 +515,32 @@ Blu-ray and DVD sources often have multiple titles, the longest of which is typi </connections> </textField> <box autoresizesSubviews="NO" borderType="line" title="Box" titlePosition="noTitle" translatesAutoresizingMaskIntoConstraints="NO" id="d0E-xw-bxh"> - <rect key="frame" x="-7" y="-4" width="899" height="81"/> + <rect key="frame" x="-7" y="-4" width="899" height="52"/> <view key="contentView" id="idQ-Ti-X2a"> - <rect key="frame" x="3" y="3" width="893" height="75"/> + <rect key="frame" x="3" y="3" width="893" height="46"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> <subviews> - <progressIndicator wantsLayer="YES" verticalHuggingPriority="750" maxValue="1" bezeled="NO" style="bar" translatesAutoresizingMaskIntoConstraints="NO" id="1373"> - <rect key="frame" x="24" y="15" width="845" height="11"/> - </progressIndicator> <textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" allowsCharacterPickerTouchBarItem="YES" preferredMaxLayoutWidth="3000" translatesAutoresizingMaskIntoConstraints="NO" id="1123"> - <rect key="frame" x="22" y="29" width="849" height="30"/> + <rect key="frame" x="22" y="8" width="849" height="30"/> <constraints> <constraint firstAttribute="height" constant="30" id="xDK-Ed-GEv"/> </constraints> <textFieldCell key="cell" controlSize="small" sendsActionOnEndEditing="YES" alignment="left" title="DO NOT TRANSLATE
THIS NIB FILE" id="4846"> - <font key="font" metaFont="smallSystem"/> + <font key="font" metaFont="message" size="11"/> <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/> <color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/> </textFieldCell> </textField> </subviews> <constraints> - <constraint firstItem="1373" firstAttribute="top" secondItem="1123" secondAttribute="bottom" constant="4" id="05I-yD-zGd"/> - <constraint firstItem="1123" firstAttribute="top" secondItem="idQ-Ti-X2a" secondAttribute="top" constant="16" id="SEd-Ur-o24"/> + <constraint firstItem="1123" firstAttribute="top" secondItem="idQ-Ti-X2a" secondAttribute="top" constant="8" id="SEd-Ur-o24"/> <constraint firstAttribute="trailing" secondItem="1123" secondAttribute="trailing" constant="24" id="VYX-jz-5IE"/> <constraint firstItem="1123" firstAttribute="leading" secondItem="idQ-Ti-X2a" secondAttribute="leading" constant="24" id="W5K-34-8HI"/> - <constraint firstAttribute="bottom" secondItem="1373" secondAttribute="bottom" constant="16" id="mrc-nZ-d8a"/> - <constraint firstAttribute="trailing" secondItem="1373" secondAttribute="trailing" constant="24" id="pFB-8q-Iuf"/> - <constraint firstItem="1373" firstAttribute="leading" secondItem="idQ-Ti-X2a" secondAttribute="leading" constant="24" id="uHd-le-njc"/> + <constraint firstAttribute="bottom" secondItem="1123" secondAttribute="bottom" constant="8" id="sqA-HN-ptf"/> </constraints> </view> <constraints> - <constraint firstAttribute="height" constant="75" id="Jqz-kV-yCt"/> + <constraint firstAttribute="height" constant="46" id="Jqz-kV-yCt"/> </constraints> </box> <popUpButton verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="bWH-Lp-mKY"> @@ -557,7 +550,7 @@ Blu-ray and DVD sources often have multiple titles, the longest of which is typi </constraints> <popUpButtonCell key="cell" type="push" title="Selected Preset" bezelStyle="rounded" alignment="left" controlSize="small" lineBreakMode="truncatingTail" state="on" borderStyle="borderAndBezel" imageScaling="proportionallyDown" inset="2" pullsDown="YES" id="4hk-61-M1H"> <behavior key="behavior" lightByBackground="YES" lightByGray="YES"/> - <font key="font" metaFont="smallSystem"/> + <font key="font" metaFont="message" size="11"/> <menu key="menu" id="X2f-Tk-x0c"> <items> <menuItem title="Selected Preset" state="on" hidden="YES" id="OYP-3T-FnA"> @@ -578,7 +571,7 @@ Blu-ray and DVD sources often have multiple titles, the longest of which is typi </connections> </popUpButton> <textField horizontalHuggingPriority="1000" verticalHuggingPriority="750" allowsCharacterPickerTouchBarItem="YES" preferredMaxLayoutWidth="100" translatesAutoresizingMaskIntoConstraints="NO" id="5180"> - <rect key="frame" x="374" y="540" width="41" height="14"/> + <rect key="frame" x="374" y="541" width="41" height="14"/> <textFieldCell key="cell" controlSize="small" sendsActionOnEndEditing="YES" alignment="left" title="Angle:" id="5185"> <font key="font" metaFont="smallSystemBold"/> <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/> @@ -594,7 +587,7 @@ Blu-ray and DVD sources often have multiple titles, the longest of which is typi </connections> </textField> <textField horizontalHuggingPriority="1000" verticalHuggingPriority="750" allowsCharacterPickerTouchBarItem="YES" preferredMaxLayoutWidth="100" translatesAutoresizingMaskIntoConstraints="NO" id="4NG-AB-JWs"> - <rect key="frame" x="472" y="540" width="43" height="14"/> + <rect key="frame" x="472" y="541" width="43" height="14"/> <textFieldCell key="cell" controlSize="small" sendsActionOnEndEditing="YES" alignment="left" title="Range:" id="IxV-PW-oYh"> <font key="font" metaFont="smallSystemBold"/> <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/> @@ -608,7 +601,7 @@ Blu-ray and DVD sources often have multiple titles, the longest of which is typi <rect key="frame" x="276" y="502" width="62" height="27"/> <buttonCell key="cell" type="push" title="Reload" bezelStyle="rounded" alignment="center" controlSize="small" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="cgS-BU-Nfd"> <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/> - <font key="font" metaFont="smallSystem"/> + <font key="font" metaFont="message" size="11"/> </buttonCell> <connections> <action selector="reloadPreset:" target="-2" id="v7a-73-wrT"/> @@ -624,7 +617,7 @@ Blu-ray and DVD sources often have multiple titles, the longest of which is typi <rect key="frame" x="336" y="502" width="124" height="27"/> <buttonCell key="cell" type="push" title="Save New Preset…" bezelStyle="rounded" alignment="center" controlSize="small" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="IOU-3L-nvB"> <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/> - <font key="font" metaFont="smallSystem"/> + <font key="font" metaFont="message" size="11"/> </buttonCell> <connections> <action selector="showAddPresetPanel:" target="-2" id="QgW-qo-eKy"/> @@ -753,7 +746,7 @@ Blu-ray and DVD sources often have multiple titles, the longest of which is typi <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" heightSizable="YES"/> <popUpButtonCell key="cell" type="roundTextured" bezelStyle="texturedRounded" image="addtitlestoqueue" alignment="center" lineBreakMode="truncatingTail" state="on" imageScaling="proportionallyDown" inset="2" pullsDown="YES" id="BAK-n3-eIN"> <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/> - <font key="font" metaFont="menu"/> + <font key="font" metaFont="system"/> <menu key="menu" id="QCi-1O-Msg"> <items> <menuItem state="on" image="addtitlestoqueue" hidden="YES" id="MCy-je-2nL"/> @@ -828,7 +821,7 @@ Blu-ray and DVD sources often have multiple titles, the longest of which is typi <connections> <outlet property="delegate" destination="-2" id="M3v-Rc-7Ca"/> </connections> - <point key="canvasLocation" x="2460" y="-738"/> + <point key="canvasLocation" x="2342" y="-745"/> </window> <userDefaultsController representsSharedInstance="YES" id="5676"/> <customView id="lZQ-gl-3wX" userLabel="Open Panel View"> @@ -849,7 +842,7 @@ Blu-ray and DVD sources often have multiple titles, the longest of which is typi </connections> </button> <textField toolTip="Title to scan." verticalHuggingPriority="750" allowsCharacterPickerTouchBarItem="YES" translatesAutoresizingMaskIntoConstraints="NO" id="3w9-Iu-3u2"> - <rect key="frame" x="136" y="12" width="52" height="22"/> + <rect key="frame" x="136" y="12" width="52" height="21"/> <constraints> <constraint firstAttribute="width" relation="greaterThanOrEqual" constant="52" id="BGA-yJ-Apd"/> </constraints> diff --git a/macosx/Base.lproj/Preferences.xib b/macosx/Base.lproj/Preferences.xib index 5aa111e51..482a704e9 100644 --- a/macosx/Base.lproj/Preferences.xib +++ b/macosx/Base.lproj/Preferences.xib @@ -1,8 +1,8 @@ <?xml version="1.0" encoding="UTF-8"?> -<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="14490.70" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES"> +<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="16096" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES"> <dependencies> <deployment identifier="macosx"/> - <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="14490.70"/> + <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="16096"/> <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> </dependencies> <objects> @@ -22,7 +22,7 @@ <windowStyleMask key="styleMask" titled="YES" closable="YES"/> <windowPositionMask key="initialPositionMask" leftStrut="YES" rightStrut="YES" topStrut="YES" bottomStrut="YES"/> <rect key="contentRect" x="136" y="318" width="500" height="200"/> - <rect key="screenRect" x="0.0" y="0.0" width="1920" height="1177"/> + <rect key="screenRect" x="0.0" y="0.0" width="1920" height="1057"/> <value key="minSize" type="size" width="212" height="107"/> <view key="contentView" id="6"> <rect key="frame" x="0.0" y="0.0" width="500" height="200"/> @@ -45,7 +45,7 @@ <rect key="frame" x="93" y="263" width="85" height="18"/> <buttonCell key="cell" type="check" title="Send file to:" bezelStyle="regularSquare" imagePosition="left" alignment="left" controlSize="small" inset="2" id="306"> <behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/> - <font key="font" metaFont="smallSystem"/> + <font key="font" metaFont="menu" size="11"/> </buttonCell> <connections> <binding destination="61" name="value" keyPath="values.HBSendToAppEnabled" id="Kff-6m-jt9"/> @@ -55,16 +55,16 @@ <rect key="frame" x="381" y="257" width="74" height="27"/> <buttonCell key="cell" type="push" title="Browse…" bezelStyle="rounded" alignment="center" controlSize="small" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="451"> <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/> - <font key="font" metaFont="smallSystem"/> + <font key="font" metaFont="menu" size="11"/> </buttonCell> <connections> <action selector="browseSendToApp:" target="-2" id="455"/> </connections> </button> <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" allowsCharacterPickerTouchBarItem="YES" preferredMaxLayoutWidth="150" translatesAutoresizingMaskIntoConstraints="NO" id="fF9-Q1-vYr"> - <rect key="frame" x="114" y="174" width="45" height="14"/> + <rect key="frame" x="114" y="173" width="45" height="14"/> <textFieldCell key="cell" controlSize="small" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" alignment="right" title="Format:" id="3dN-MN-DcP"> - <font key="font" metaFont="smallSystem"/> + <font key="font" metaFont="menu" size="11"/> <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/> <color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/> </textFieldCell> @@ -76,7 +76,7 @@ <rect key="frame" x="93" y="281" width="151" height="18"/> <buttonCell key="cell" type="check" title="Play System Alert Sound" bezelStyle="regularSquare" imagePosition="left" alignment="left" controlSize="small" state="on" inset="2" id="458"> <behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/> - <font key="font" metaFont="smallSystem"/> + <font key="font" metaFont="menu" size="11"/> </buttonCell> <connections> <binding destination="61" name="value" keyPath="values.HBAlertWhenDoneSound" id="5A8-fz-MEz"/> @@ -85,7 +85,7 @@ <textField horizontalHuggingPriority="251" verticalHuggingPriority="751" verticalCompressionResistancePriority="1000" allowsCharacterPickerTouchBarItem="YES" translatesAutoresizingMaskIntoConstraints="NO" id="LKY-ui-YVw"> <rect key="frame" x="163" y="76" width="274" height="14"/> <textFieldCell key="cell" controlSize="small" sendsActionOnEndEditing="YES" title="Drag labels to Format to compose a naming format." id="dQ6-Dh-9sD"> - <font key="font" metaFont="smallSystem"/> + <font key="font" metaFont="menu" size="11"/> <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/> <color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/> </textFieldCell> @@ -94,7 +94,7 @@ <rect key="frame" x="113" y="53" width="198" height="18"/> <buttonCell key="cell" type="check" title="Replace underscores with spaces" bezelStyle="regularSquare" imagePosition="left" controlSize="small" state="on" inset="2" id="pUi-lK-cHw"> <behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/> - <font key="font" metaFont="smallSystem"/> + <font key="font" metaFont="menu" size="11"/> </buttonCell> <connections> <binding destination="61" name="enabled" keyPath="values.DefaultAutoNaming" id="NEY-u9-7gj"/> @@ -105,7 +105,7 @@ <rect key="frame" x="93" y="195" width="188" height="18"/> <buttonCell key="cell" type="check" title="Automatically name output files" bezelStyle="regularSquare" imagePosition="left" alignment="left" controlSize="small" inset="2" id="302"> <behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/> - <font key="font" metaFont="smallSystem"/> + <font key="font" metaFont="menu" size="11"/> </buttonCell> <connections> <binding destination="61" name="value" keyPath="values.DefaultAutoNaming" id="262"/> @@ -114,7 +114,7 @@ <textField horizontalHuggingPriority="249" verticalHuggingPriority="750" horizontalCompressionResistancePriority="1000" allowsCharacterPickerTouchBarItem="YES" preferredMaxLayoutWidth="200" translatesAutoresizingMaskIntoConstraints="NO" id="242"> <rect key="frame" x="18" y="324" width="72" height="14"/> <textFieldCell key="cell" controlSize="small" sendsActionOnEndEditing="YES" alignment="right" title="When Done:" id="304"> - <font key="font" metaFont="smallSystem"/> + <font key="font" metaFont="menu" size="11"/> <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/> <color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/> </textFieldCell> @@ -122,7 +122,7 @@ <textField horizontalHuggingPriority="248" verticalHuggingPriority="750" allowsCharacterPickerTouchBarItem="YES" preferredMaxLayoutWidth="300" translatesAutoresizingMaskIntoConstraints="NO" id="448"> <rect key="frame" x="178" y="265" width="195" height="14"/> <textFieldCell key="cell" controlSize="small" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="None" id="449"> - <font key="font" metaFont="smallSystem"/> + <font key="font" metaFont="menu" size="11"/> <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/> <color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/> <connections> @@ -140,7 +140,7 @@ <textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="1000" allowsCharacterPickerTouchBarItem="YES" preferredMaxLayoutWidth="200" translatesAutoresizingMaskIntoConstraints="NO" id="275"> <rect key="frame" x="18" y="387" width="72" height="14"/> <textFieldCell key="cell" controlSize="small" sendsActionOnEndEditing="YES" alignment="right" title="At Launch:" id="307"> - <font key="font" metaFont="smallSystem"/> + <font key="font" metaFont="menu" size="11"/> <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/> <color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/> </textFieldCell> @@ -148,7 +148,7 @@ <textField horizontalHuggingPriority="249" verticalHuggingPriority="750" horizontalCompressionResistancePriority="1000" allowsCharacterPickerTouchBarItem="YES" preferredMaxLayoutWidth="300" translatesAutoresizingMaskIntoConstraints="NO" id="276"> <rect key="frame" x="18" y="220" width="72" height="14"/> <textFieldCell key="cell" controlSize="small" sendsActionOnEndEditing="YES" alignment="right" title="Output Files:" id="308"> - <font key="font" metaFont="smallSystem"/> + <font key="font" metaFont="menu" size="11"/> <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/> <color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/> </textFieldCell> @@ -159,7 +159,7 @@ <constraint firstAttribute="height" relation="greaterThanOrEqual" constant="46" id="adq-dM-HeA"/> </constraints> <tokenFieldCell key="cell" controlSize="small" selectable="YES" allowsUndo="NO" alignment="left" allowsEditingTextAttributes="YES" id="cjy-yP-lqT"> - <font key="font" metaFont="smallSystem"/> + <font key="font" metaFont="menu" size="11"/> <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/> <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/> </tokenFieldCell> @@ -172,7 +172,7 @@ <rect key="frame" x="113" y="35" width="178" height="18"/> <buttonCell key="cell" type="check" title="Remove common punctuation" bezelStyle="regularSquare" imagePosition="left" controlSize="small" state="on" inset="2" id="wo5-iR-2mb"> <behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/> - <font key="font" metaFont="smallSystem"/> + <font key="font" metaFont="menu" size="11"/> </buttonCell> <connections> <binding destination="61" name="enabled" keyPath="values.DefaultAutoNaming" id="670-dr-Vj0"/> @@ -183,7 +183,7 @@ <rect key="frame" x="93" y="385" width="154" height="18"/> <buttonCell key="cell" type="check" title="Show Open Source panel" bezelStyle="regularSquare" imagePosition="left" alignment="left" controlSize="small" inset="2" id="Zqz-Kn-xOS"> <behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/> - <font key="font" metaFont="smallSystem"/> + <font key="font" metaFont="menu" size="11"/> </buttonCell> <connections> <binding destination="61" name="value" keyPath="values.HBShowOpenPanelAtLaunch" id="hsG-Dx-Mf3"/> @@ -192,7 +192,7 @@ <textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" allowsCharacterPickerTouchBarItem="YES" preferredMaxLayoutWidth="300" translatesAutoresizingMaskIntoConstraints="NO" id="486"> <rect key="frame" x="94" y="220" width="126" height="14"/> <textFieldCell key="cell" controlSize="small" sendsActionOnEndEditing="YES" alignment="right" title="Default MP4 Extension:" id="487"> - <font key="font" metaFont="smallSystem"/> + <font key="font" metaFont="menu" size="11"/> <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/> <color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/> </textFieldCell> @@ -204,7 +204,7 @@ </constraints> <popUpButtonCell key="cell" type="push" title="Auto" bezelStyle="rounded" alignment="left" controlSize="small" lineBreakMode="truncatingTail" state="on" borderStyle="borderAndBezel" inset="2" arrowPosition="arrowAtCenter" preferredEdge="maxY" selectedItem="292" id="309"> <behavior key="behavior" lightByBackground="YES" lightByGray="YES"/> - <font key="font" metaFont="smallSystem"/> + <font key="font" metaFont="menu" size="11"/> <menu key="menu" title="OtherViews" id="290"> <items> <menuItem title="Auto" state="on" id="292"/> @@ -222,7 +222,7 @@ <rect key="frame" x="93" y="319" width="157" height="22"/> <popUpButtonCell key="cell" type="push" title="Notification" bezelStyle="rounded" alignment="left" controlSize="small" lineBreakMode="truncatingTail" state="on" borderStyle="borderAndBezel" tag="2" imageScaling="proportionallyDown" inset="2" selectedItem="499" id="492"> <behavior key="behavior" lightByBackground="YES" lightByGray="YES"/> - <font key="font" metaFont="smallSystem"/> + <font key="font" metaFont="menu" size="11"/> <menu key="menu" title="OtherViews" id="493"> <items> <menuItem title="Do Nothing" id="494"/> @@ -243,7 +243,7 @@ <rect key="frame" x="113" y="17" width="160" height="18"/> <buttonCell key="cell" type="check" title="Change case to Title Case" bezelStyle="regularSquare" imagePosition="left" controlSize="small" state="on" inset="2" id="ggR-Zs-P8G"> <behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/> - <font key="font" metaFont="smallSystem"/> + <font key="font" metaFont="menu" size="11"/> </buttonCell> <connections> <binding destination="61" name="enabled" keyPath="values.DefaultAutoNaming" id="OIc-Z7-E7O"/> @@ -256,7 +256,7 @@ <constraint firstAttribute="width" constant="285" id="UgZ-NZ-28V"/> </constraints> <tokenFieldCell key="cell" controlSize="small" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" borderStyle="bezel" alignment="left" drawsBackground="YES" allowsEditingTextAttributes="YES" id="dHt-ry-PKg"> - <font key="font" metaFont="smallSystem"/> + <font key="font" metaFont="menu" size="11"/> <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/> <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/> </tokenFieldCell> @@ -276,7 +276,7 @@ <rect key="frame" x="93" y="367" width="230" height="18"/> <buttonCell key="cell" type="check" title="Automatically check for updates weekly" bezelStyle="regularSquare" imagePosition="left" alignment="left" controlSize="small" inset="2" id="305"> <behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/> - <font key="font" metaFont="smallSystem"/> + <font key="font" metaFont="menu" size="11"/> </buttonCell> <connections> <binding destination="410" name="value" keyPath="updater.automaticallyChecksForUpdates" id="rsY-XJ-el2"/> @@ -286,7 +286,7 @@ <rect key="frame" x="93" y="299" width="190" height="18"/> <buttonCell key="cell" type="check" title="Reset to "Do nothing" on launch" bezelStyle="regularSquare" imagePosition="left" alignment="left" controlSize="small" state="on" inset="2" id="Uxv-oN-c1r"> <behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/> - <font key="font" metaFont="smallSystem"/> + <font key="font" metaFont="menu" size="11"/> </buttonCell> <connections> <binding destination="61" name="value" keyPath="values.HBResetWhenDoneOnLaunch" id="mQx-nk-zXN"/> @@ -366,17 +366,17 @@ <point key="canvasLocation" x="298" y="-127"/> </customView> <customView id="236" userLabel="Advanced"> - <rect key="frame" x="0.0" y="0.0" width="454" height="316"/> + <rect key="frame" x="0.0" y="0.0" width="454" height="337"/> <autoresizingMask key="autoresizingMask"/> <subviews> <customView translatesAutoresizingMaskIntoConstraints="NO" id="4UU-uq-R9U"> - <rect key="frame" x="16" y="0.0" width="422" height="316"/> + <rect key="frame" x="16" y="0.0" width="422" height="337"/> <subviews> <popUpButton toolTip="Verbosity Level. Extended verbosity records more technical information to the Activity Log. Minimal verbosity records less." verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="363"> - <rect key="frame" x="164" y="139" width="90" height="22"/> + <rect key="frame" x="164" y="160" width="90" height="22"/> <popUpButtonCell key="cell" type="push" title="Standard" bezelStyle="rounded" alignment="left" controlSize="small" lineBreakMode="truncatingTail" state="on" borderStyle="borderAndBezel" tag="1" imageScaling="proportionallyDown" inset="2" selectedItem="369" id="364"> <behavior key="behavior" lightByBackground="YES" lightByGray="YES"/> - <font key="font" metaFont="smallSystem"/> + <font key="font" metaFont="menu" size="11"/> <menu key="menu" title="OtherViews" id="365"> <items> <menuItem title="Minimised" id="370"/> @@ -391,10 +391,10 @@ </connections> </popUpButton> <popUpButton toolTip="Determines the granularity of the x264 Constant Quality control. Smaller values allow for finer quality increments." horizontalHuggingPriority="249" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="387"> - <rect key="frame" x="284" y="277" width="60" height="22"/> + <rect key="frame" x="284" y="298" width="60" height="22"/> <popUpButtonCell key="cell" type="push" title="0.25" bezelStyle="rounded" alignment="left" controlSize="small" lineBreakMode="truncatingTail" state="on" borderStyle="borderAndBezel" tag="4" imageScaling="proportionallyDown" inset="2" selectedItem="391" id="388"> <behavior key="behavior" lightByBackground="YES" lightByGray="YES"/> - <font key="font" metaFont="smallSystem"/> + <font key="font" metaFont="menu" size="11"/> <menu key="menu" title="OtherViews" id="389"> <items> <menuItem title="1.0" tag="1" id="394"/> @@ -414,104 +414,104 @@ </connections> </popUpButton> <button toolTip="Use libdvdnav to read DVDs. Only disable this for problematic DVDs where libdvdread works better (rare)." verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="398"> - <rect key="frame" x="72" y="175" width="219" height="18"/> + <rect key="frame" x="72" y="196" width="219" height="18"/> <buttonCell key="cell" type="check" title="Use libdvdnav (instead of libdvdread)" bezelStyle="regularSquare" imagePosition="left" alignment="left" controlSize="small" inset="2" id="399"> <behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/> - <font key="font" metaFont="smallSystem"/> + <font key="font" metaFont="menu" size="11"/> </buttonCell> <connections> <binding destination="61" name="value" keyPath="values.UseDvdNav" id="400"/> </connections> </button> <button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="347"> - <rect key="frame" x="72" y="121" width="256" height="18"/> + <rect key="frame" x="72" y="142" width="256" height="18"/> <buttonCell key="cell" type="check" title="Store Activity Logs in same location as video" bezelStyle="regularSquare" imagePosition="left" alignment="left" controlSize="small" inset="2" id="348"> <behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/> - <font key="font" metaFont="smallSystem"/> + <font key="font" metaFont="menu" size="11"/> </buttonCell> <connections> <binding destination="61" name="value" keyPath="values.EncodeLogLocation" id="349"/> </connections> </button> <textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="1000" allowsCharacterPickerTouchBarItem="YES" preferredMaxLayoutWidth="300" translatesAutoresizingMaskIntoConstraints="NO" id="442"> - <rect key="frame" x="-2" y="177" width="71" height="14"/> + <rect key="frame" x="-2" y="198" width="71" height="14"/> <textFieldCell key="cell" controlSize="small" sendsActionOnEndEditing="YES" alignment="right" title="DVD Reader:" id="443"> - <font key="font" metaFont="smallSystem"/> + <font key="font" metaFont="menu" size="11"/> <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/> <color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/> </textFieldCell> </textField> <textField horizontalHuggingPriority="248" verticalHuggingPriority="750" horizontalCompressionResistancePriority="1000" allowsCharacterPickerTouchBarItem="YES" preferredMaxLayoutWidth="300" translatesAutoresizingMaskIntoConstraints="NO" id="IV7-SY-HLR"> - <rect key="frame" x="-2" y="248" width="71" height="14"/> + <rect key="frame" x="-2" y="269" width="71" height="14"/> <textFieldCell key="cell" controlSize="small" sendsActionOnEndEditing="YES" alignment="right" title="Title Scan:" id="c0L-TU-WML"> - <font key="font" metaFont="smallSystem"/> + <font key="font" metaFont="menu" size="11"/> <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/> <color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/> </textFieldCell> </textField> <textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="1000" allowsCharacterPickerTouchBarItem="YES" preferredMaxLayoutWidth="300" translatesAutoresizingMaskIntoConstraints="NO" id="jPa-4p-Y29"> - <rect key="frame" x="-2" y="282" width="71" height="14"/> + <rect key="frame" x="-2" y="303" width="71" height="14"/> <textFieldCell key="cell" controlSize="small" sendsActionOnEndEditing="YES" alignment="right" title="Encoder:" id="cqp-xU-GOe"> - <font key="font" metaFont="smallSystem"/> + <font key="font" metaFont="menu" size="11"/> <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/> <color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/> </textFieldCell> </textField> <textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" allowsCharacterPickerTouchBarItem="YES" preferredMaxLayoutWidth="300" translatesAutoresizingMaskIntoConstraints="NO" id="350"> - <rect key="frame" x="-2" y="144" width="71" height="14"/> + <rect key="frame" x="-2" y="165" width="71" height="14"/> <textFieldCell key="cell" controlSize="small" sendsActionOnEndEditing="YES" alignment="right" title="Activity Logs:" id="351"> - <font key="font" metaFont="smallSystem"/> + <font key="font" metaFont="menu" size="11"/> <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/> <color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/> </textFieldCell> </textField> <textField toolTip="Verbosity Level. Extended verbosity records more technical information to the Activity Log. Minimal verbosity records less." verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" allowsCharacterPickerTouchBarItem="YES" preferredMaxLayoutWidth="200" translatesAutoresizingMaskIntoConstraints="NO" id="371"> - <rect key="frame" x="73" y="144" width="88" height="14"/> + <rect key="frame" x="73" y="165" width="88" height="14"/> <textFieldCell key="cell" controlSize="small" sendsActionOnEndEditing="YES" alignment="right" title="Verbosity Level:" id="372"> - <font key="font" metaFont="smallSystem"/> + <font key="font" metaFont="menu" size="11"/> <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/> <color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/> </textFieldCell> </textField> <textField toolTip="Number of picture previews to scan. Higher values may increase automatic cropping accuracy at the expense of title scan time." verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" allowsCharacterPickerTouchBarItem="YES" preferredMaxLayoutWidth="400" translatesAutoresizingMaskIntoConstraints="NO" id="359"> - <rect key="frame" x="73" y="226" width="195" height="14"/> + <rect key="frame" x="73" y="247" width="195" height="14"/> <textFieldCell key="cell" controlSize="small" sendsActionOnEndEditing="YES" alignment="right" title="Number of picture previews to scan:" id="360"> - <font key="font" metaFont="smallSystem"/> + <font key="font" metaFont="menu" size="11"/> <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/> <color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/> </textFieldCell> </textField> <textField toolTip="Minimum DVD and Blu-ray title duration in seconds. Shorter titles will be skipped." verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" allowsCharacterPickerTouchBarItem="YES" preferredMaxLayoutWidth="400" translatesAutoresizingMaskIntoConstraints="NO" id="463"> - <rect key="frame" x="73" y="248" width="228" height="14"/> + <rect key="frame" x="73" y="269" width="228" height="14"/> <textFieldCell key="cell" controlSize="small" sendsActionOnEndEditing="YES" alignment="right" title="Ignore DVD and Blu-ray titles shorter than:" id="464"> - <font key="font" metaFont="smallSystem"/> + <font key="font" metaFont="menu" size="11"/> <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/> <color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/> </textFieldCell> </textField> <textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" allowsCharacterPickerTouchBarItem="YES" preferredMaxLayoutWidth="200" translatesAutoresizingMaskIntoConstraints="NO" id="UXr-op-aKN"> - <rect key="frame" x="352" y="248" width="49" height="14"/> + <rect key="frame" x="352" y="269" width="49" height="14"/> <textFieldCell key="cell" controlSize="small" sendsActionOnEndEditing="YES" alignment="left" title="seconds" id="klQ-DW-Kc6"> - <font key="font" metaFont="smallSystem"/> + <font key="font" metaFont="menu" size="11"/> <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/> <color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/> </textFieldCell> </textField> <textField toolTip="Determines the granularity of the x264 Constant Quality control. Smaller values allow for finer quality increments." verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" allowsCharacterPickerTouchBarItem="YES" preferredMaxLayoutWidth="400" translatesAutoresizingMaskIntoConstraints="NO" id="395"> - <rect key="frame" x="73" y="282" width="208" height="14"/> + <rect key="frame" x="73" y="303" width="208" height="14"/> <textFieldCell key="cell" controlSize="small" sendsActionOnEndEditing="YES" alignment="right" title="Constant Quality fractional granularity:" id="396"> - <font key="font" metaFont="smallSystem"/> + <font key="font" metaFont="menu" size="11"/> <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/> <color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/> </textFieldCell> </textField> <textField toolTip="Minimum title duration in seconds. Shorter titles will be skipped." verticalHuggingPriority="750" allowsCharacterPickerTouchBarItem="YES" translatesAutoresizingMaskIntoConstraints="NO" id="480"> - <rect key="frame" x="307" y="245" width="40" height="19"/> + <rect key="frame" x="307" y="267" width="40" height="19"/> <constraints> <constraint firstAttribute="width" constant="40" id="y5Z-y6-LMm"/> </constraints> <textFieldCell key="cell" controlSize="small" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" state="on" borderStyle="bezel" drawsBackground="YES" id="481"> - <font key="font" metaFont="smallSystem"/> + <font key="font" metaFont="menu" size="11"/> <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/> <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/> </textFieldCell> @@ -521,13 +521,13 @@ </connections> </textField> <popUpButton toolTip="Number of picture previews to scan. Higher values may increase automatic cropping accuracy at the expense of title scan time." verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="352"> - <rect key="frame" x="271" y="221" width="56" height="22"/> + <rect key="frame" x="271" y="242" width="56" height="22"/> <constraints> <constraint firstAttribute="width" relation="greaterThanOrEqual" constant="50" id="ASh-ct-Imw"/> </constraints> <popUpButtonCell key="cell" type="push" title="15" bezelStyle="rounded" alignment="left" controlSize="small" lineBreakMode="truncatingTail" state="on" borderStyle="borderAndBezel" imageScaling="proportionallyDown" inset="2" selectedItem="356" id="353"> <behavior key="behavior" lightByBackground="YES" lightByGray="YES"/> - <font key="font" metaFont="smallSystem"/> + <font key="font" metaFont="menu" size="11"/> <menu key="menu" title="OtherViews" id="354"> <items> <menuItem title="10" id="355"/> @@ -566,51 +566,51 @@ </connections> </popUpButton> <button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="Ndp-Xh-ohY"> - <rect key="frame" x="72" y="103" width="342" height="18"/> + <rect key="frame" x="72" y="124" width="342" height="18"/> <buttonCell key="cell" type="check" title="Remove old logs from main Activity Logs folder after 30 days" bezelStyle="regularSquare" imagePosition="left" alignment="left" controlSize="small" inset="2" id="lgn-RF-k0d"> <behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/> - <font key="font" metaFont="smallSystem"/> + <font key="font" metaFont="menu" size="11"/> </buttonCell> <connections> <binding destination="61" name="value" keyPath="values.HBClearOldLogs" id="98r-xV-IVB"/> </connections> </button> <box verticalHuggingPriority="750" boxType="separator" translatesAutoresizingMaskIntoConstraints="NO" id="I0X-1x-9qe"> - <rect key="frame" x="0.0" y="205" width="422" height="5"/> + <rect key="frame" x="0.0" y="226" width="422" height="5"/> </box> <textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" allowsCharacterPickerTouchBarItem="YES" preferredMaxLayoutWidth="300" translatesAutoresizingMaskIntoConstraints="NO" id="sRQ-Oe-1xH"> - <rect key="frame" x="-2" y="71" width="71" height="14"/> + <rect key="frame" x="-2" y="92" width="71" height="14"/> <textFieldCell key="cell" controlSize="small" sendsActionOnEndEditing="YES" alignment="right" title="Queue:" id="FKi-zh-5gc"> - <font key="font" metaFont="smallSystem"/> + <font key="font" metaFont="menu" size="11"/> <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/> <color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/> </textFieldCell> </textField> <button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="htF-lD-ZBh"> - <rect key="frame" x="72" y="69" width="232" height="18"/> + <rect key="frame" x="72" y="90" width="232" height="18"/> <buttonCell key="cell" type="check" title="Pause queue if disk space is lower than:" bezelStyle="regularSquare" imagePosition="left" alignment="left" controlSize="small" inset="2" id="yG9-mz-tqQ"> <behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/> - <font key="font" metaFont="smallSystem"/> + <font key="font" metaFont="menu" size="11"/> </buttonCell> <connections> <binding destination="61" name="value" keyPath="values.HBQueuePauseIfLowSpace" id="GWr-Dv-XBh"/> </connections> </button> <textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" allowsCharacterPickerTouchBarItem="YES" preferredMaxLayoutWidth="200" translatesAutoresizingMaskIntoConstraints="NO" id="Koh-5H-cdo"> - <rect key="frame" x="355" y="71" width="20" height="14"/> + <rect key="frame" x="355" y="92" width="20" height="14"/> <textFieldCell key="cell" controlSize="small" sendsActionOnEndEditing="YES" alignment="left" title="GB" id="FZE-ZR-g93"> - <font key="font" metaFont="smallSystem"/> + <font key="font" metaFont="menu" size="11"/> <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/> <color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/> </textFieldCell> </textField> <textField toolTip="Minimum free space on destination disk." verticalHuggingPriority="750" allowsCharacterPickerTouchBarItem="YES" translatesAutoresizingMaskIntoConstraints="NO" id="PaR-zw-opS"> - <rect key="frame" x="310" y="68" width="40" height="19"/> + <rect key="frame" x="310" y="90" width="40" height="19"/> <constraints> <constraint firstAttribute="width" constant="40" id="uuf-kg-lmG"/> </constraints> <textFieldCell key="cell" controlSize="small" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" state="on" borderStyle="bezel" drawsBackground="YES" id="Qph-AN-EnT"> - <font key="font" metaFont="smallSystem"/> + <font key="font" metaFont="menu" size="11"/> <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/> <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/> </textFieldCell> @@ -620,35 +620,68 @@ </connections> </textField> <button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="Ls7-9W-hx0"> - <rect key="frame" x="72" y="51" width="322" height="18"/> + <rect key="frame" x="72" y="72" width="322" height="18"/> <buttonCell key="cell" type="check" title="Always clear completed items after an encode completes" bezelStyle="regularSquare" imagePosition="left" alignment="left" controlSize="small" inset="2" id="BPU-E2-N8l"> <behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/> - <font key="font" metaFont="smallSystem"/> + <font key="font" metaFont="menu" size="11"/> </buttonCell> <connections> <binding destination="61" name="value" keyPath="values.HBQueueAutoClearCompletedItems" id="REM-0C-RXQ"/> </connections> </button> <textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" allowsCharacterPickerTouchBarItem="YES" preferredMaxLayoutWidth="300" translatesAutoresizingMaskIntoConstraints="NO" id="6NP-6w-Wa6"> - <rect key="frame" x="-2" y="19" width="71" height="14"/> + <rect key="frame" x="-2" y="20" width="71" height="14"/> <textFieldCell key="cell" controlSize="small" sendsActionOnEndEditing="YES" alignment="right" title="Summary:" id="GQJ-go-PoN"> - <font key="font" metaFont="smallSystem"/> + <font key="font" metaFont="menu" size="11"/> <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/> <color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/> </textFieldCell> </textField> <button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="tTD-8F-0aT"> - <rect key="frame" x="72" y="17" width="136" height="18"/> + <rect key="frame" x="72" y="18" width="136" height="18"/> <buttonCell key="cell" type="check" title="Show preview images" bezelStyle="regularSquare" imagePosition="left" controlSize="small" state="on" inset="2" id="Aao-Tf-JeJ"> <behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/> - <font key="font" metaFont="smallSystem"/> + <font key="font" metaFont="menu" size="11"/> </buttonCell> <connections> <binding destination="61" name="value" keyPath="values.HBShowSummaryPreview" id="NcJ-BV-BdB"/> </connections> </button> + <textField toolTip="Number of picture previews to scan. Higher values may increase automatic cropping accuracy at the expense of title scan time." verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" allowsCharacterPickerTouchBarItem="YES" preferredMaxLayoutWidth="400" translatesAutoresizingMaskIntoConstraints="NO" id="qkp-nA-8ES"> + <rect key="frame" x="73" y="55" width="184" height="14"/> + <textFieldCell key="cell" controlSize="small" sendsActionOnEndEditing="YES" alignment="left" title="Number of simultaneous encodes:" id="iGS-b5-ip7"> + <font key="font" metaFont="menu" size="11"/> + <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/> + <color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/> + </textFieldCell> + </textField> + <popUpButton toolTip="Number of picture previews to scan. Higher values may increase automatic cropping accuracy at the expense of title scan time." verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="MLd-Te-AbW"> + <rect key="frame" x="260" y="50" width="56" height="22"/> + <constraints> + <constraint firstAttribute="width" relation="greaterThanOrEqual" constant="50" id="g0s-lV-HXi"/> + </constraints> + <popUpButtonCell key="cell" type="push" title="1" bezelStyle="rounded" alignment="left" controlSize="small" lineBreakMode="truncatingTail" state="on" borderStyle="borderAndBezel" tag="1" imageScaling="proportionallyDown" inset="2" selectedItem="l8v-ns-6UR" id="Ehf-WH-7od"> + <behavior key="behavior" lightByBackground="YES" lightByGray="YES"/> + <font key="font" metaFont="menu" size="11"/> + <menu key="menu" title="OtherViews" id="TpU-3v-fhx"> + <items> + <menuItem title="1" state="on" tag="1" id="l8v-ns-6UR"/> + <menuItem title="2" tag="2" id="JcO-br-AXz"/> + <menuItem title="3" tag="3" id="ZGL-FR-zSW"/> + <menuItem title="4" tag="4" id="nTJ-DB-eOd"> + <modifierMask key="keyEquivalentModifierMask"/> + </menuItem> + </items> + </menu> + </popUpButtonCell> + <connections> + <accessibilityConnection property="title" destination="qkp-nA-8ES" id="Zgd-vO-nh8"/> + <binding destination="61" name="selectedTag" keyPath="values.HBQueueWorkerCounts" id="Ghu-LG-z3R"/> + </connections> + </popUpButton> </subviews> <constraints> + <constraint firstAttribute="bottom" secondItem="6NP-6w-Wa6" secondAttribute="bottom" constant="20" id="02D-Cp-pYu"/> <constraint firstItem="jPa-4p-Y29" firstAttribute="leading" secondItem="4UU-uq-R9U" secondAttribute="leading" id="0XL-N8-hhe"/> <constraint firstAttribute="trailing" relation="greaterThanOrEqual" secondItem="363" secondAttribute="trailing" constant="20" id="0by-WQ-IEO"/> <constraint firstItem="442" firstAttribute="leading" secondItem="jPa-4p-Y29" secondAttribute="leading" id="0y2-cf-8RZ"/> @@ -662,6 +695,7 @@ <constraint firstItem="htF-lD-ZBh" firstAttribute="baseline" secondItem="sRQ-Oe-1xH" secondAttribute="baseline" id="DMh-iO-Tvh"/> <constraint firstItem="sRQ-Oe-1xH" firstAttribute="width" secondItem="jPa-4p-Y29" secondAttribute="width" id="DYV-81-ZgI"/> <constraint firstItem="6NP-6w-Wa6" firstAttribute="leading" secondItem="sRQ-Oe-1xH" secondAttribute="leading" id="Dcs-HM-CpI"/> + <constraint firstItem="qkp-nA-8ES" firstAttribute="firstBaseline" secondItem="MLd-Te-AbW" secondAttribute="firstBaseline" id="EDc-1w-mKF"/> <constraint firstItem="IV7-SY-HLR" firstAttribute="width" secondItem="jPa-4p-Y29" secondAttribute="width" id="Ekr-Q8-lG6"/> <constraint firstAttribute="trailing" relation="greaterThanOrEqual" secondItem="347" secondAttribute="trailing" id="G8s-yJ-mYX"/> <constraint firstItem="371" firstAttribute="leading" secondItem="350" secondAttribute="trailing" constant="8" id="GOV-QT-45K"/> @@ -672,14 +706,13 @@ <constraint firstItem="463" firstAttribute="top" secondItem="395" secondAttribute="bottom" constant="20" id="LNo-ir-2Ih"/> <constraint firstItem="jPa-4p-Y29" firstAttribute="top" secondItem="4UU-uq-R9U" secondAttribute="top" constant="20" id="Mib-9l-uBL"/> <constraint firstItem="371" firstAttribute="top" secondItem="398" secondAttribute="bottom" constant="20" id="Mt3-Wx-Kuh"/> - <constraint firstAttribute="bottom" secondItem="tTD-8F-0aT" secondAttribute="bottom" constant="20" id="NEV-0p-AMk"/> <constraint firstItem="Ls7-9W-hx0" firstAttribute="leading" secondItem="htF-lD-ZBh" secondAttribute="leading" id="PdO-BP-qSB"/> <constraint firstItem="442" firstAttribute="width" secondItem="jPa-4p-Y29" secondAttribute="width" id="Pqh-h0-NeI"/> <constraint firstItem="Ls7-9W-hx0" firstAttribute="top" secondItem="htF-lD-ZBh" secondAttribute="bottom" constant="6" id="Rs7-bD-PiT"/> <constraint firstItem="UXr-op-aKN" firstAttribute="leading" secondItem="480" secondAttribute="trailing" constant="7" id="TR5-Sj-PDx"/> <constraint firstItem="htF-lD-ZBh" firstAttribute="leading" secondItem="sRQ-Oe-1xH" secondAttribute="trailing" constant="8" id="TW2-Vp-Dg8"/> - <constraint firstItem="tTD-8F-0aT" firstAttribute="top" secondItem="Ls7-9W-hx0" secondAttribute="bottom" constant="22" id="TZq-90-UKk"/> <constraint firstItem="I0X-1x-9qe" firstAttribute="top" secondItem="359" secondAttribute="bottom" constant="18" id="VUn-iF-GUU"/> + <constraint firstItem="qkp-nA-8ES" firstAttribute="baseline" secondItem="MLd-Te-AbW" secondAttribute="baseline" id="VjC-94-U9I"/> <constraint firstAttribute="trailing" relation="greaterThanOrEqual" secondItem="Ndp-Xh-ohY" secondAttribute="trailing" id="W8N-xj-n7t"/> <constraint firstAttribute="trailing" relation="greaterThanOrEqual" secondItem="387" secondAttribute="trailing" id="WCG-H7-Rbj"/> <constraint firstAttribute="trailing" relation="greaterThanOrEqual" secondItem="352" secondAttribute="trailing" id="WEZ-OQ-4u6"/> @@ -703,7 +736,9 @@ <constraint firstItem="350" firstAttribute="leading" secondItem="jPa-4p-Y29" secondAttribute="leading" id="ij3-90-HPL"/> <constraint firstItem="480" firstAttribute="leading" secondItem="463" secondAttribute="trailing" constant="8" id="jCH-kU-onJ"/> <constraint firstItem="398" firstAttribute="baseline" secondItem="442" secondAttribute="baseline" id="jgZ-xm-mR7"/> + <constraint firstItem="tTD-8F-0aT" firstAttribute="top" secondItem="qkp-nA-8ES" secondAttribute="bottom" constant="22" id="mXO-Hy-cLI"/> <constraint firstItem="463" firstAttribute="leading" secondItem="IV7-SY-HLR" secondAttribute="trailing" constant="8" id="n94-r1-Eio"/> + <constraint firstItem="qkp-nA-8ES" firstAttribute="top" secondItem="Ls7-9W-hx0" secondAttribute="bottom" constant="6" id="nB5-Nm-KZD"/> <constraint firstAttribute="trailing" relation="greaterThanOrEqual" secondItem="Koh-5H-cdo" secondAttribute="trailing" id="sEI-yd-xdc"/> <constraint firstItem="371" firstAttribute="baseline" secondItem="363" secondAttribute="baseline" id="sKu-bO-LUe"/> <constraint firstItem="Ndp-Xh-ohY" firstAttribute="leading" secondItem="347" secondAttribute="leading" id="tCO-d0-lRc"/> @@ -713,6 +748,8 @@ <constraint firstItem="463" firstAttribute="baseline" secondItem="480" secondAttribute="baseline" id="ulv-OM-ioh"/> <constraint firstItem="359" firstAttribute="top" secondItem="463" secondAttribute="bottom" constant="8" id="uzg-mY-YoJ"/> <constraint firstItem="PaR-zw-opS" firstAttribute="baseline" secondItem="htF-lD-ZBh" secondAttribute="baseline" id="wLK-IO-wMW"/> + <constraint firstItem="qkp-nA-8ES" firstAttribute="leading" secondItem="Ls7-9W-hx0" secondAttribute="leading" id="y3F-1r-04l"/> + <constraint firstItem="MLd-Te-AbW" firstAttribute="leading" secondItem="qkp-nA-8ES" secondAttribute="trailing" constant="8" id="ywX-ah-zfT"/> <constraint firstItem="I0X-1x-9qe" firstAttribute="leading" secondItem="4UU-uq-R9U" secondAttribute="leading" id="zfW-ta-RNq"/> </constraints> </customView> @@ -725,7 +762,7 @@ <constraint firstItem="4UU-uq-R9U" firstAttribute="leading" secondItem="236" secondAttribute="leading" constant="16" id="llp-tm-9Or"/> <constraint firstAttribute="trailing" relation="greaterThanOrEqual" secondItem="4UU-uq-R9U" secondAttribute="trailing" priority="750" constant="16" id="yAs-3j-mb6"/> </constraints> - <point key="canvasLocation" x="452" y="-534.5"/> + <point key="canvasLocation" x="452" y="-528.5"/> </customView> <customObject id="410" userLabel="Updater" customClass="SPUStandardUpdaterController"/> </objects> diff --git a/macosx/HBAppDelegate.m b/macosx/HBAppDelegate.m index bcc1a4498..f61dafa16 100644 --- a/macosx/HBAppDelegate.m +++ b/macosx/HBAppDelegate.m @@ -15,6 +15,7 @@ #import "HBPreferencesController.h" #import "HBQueueController.h" +#import "HBQueueDockTileController.h" #import "HBOutputPanelController.h" #import "HBController.h" @@ -33,6 +34,7 @@ @property (nonatomic, strong) HBQueue *queue; @property (nonatomic, strong) HBQueueController *queueController; +@property (nonatomic, strong) HBQueueDockTileController *queueDockTileController; @property (nonatomic, strong) HBOutputPanelController *outputPanel; @@ -66,6 +68,7 @@ _queue = [[HBQueue alloc] initWithURL:[appSupportURL URLByAppendingPathComponent:QUEUE_FILE]]; _queueController = [[HBQueueController alloc] initWithQueue:_queue]; _queueController.delegate = self; + _queueDockTileController = [[HBQueueDockTileController alloc] initWithQueue:_queue dockTile:NSApplication.sharedApplication.dockTile image:NSApplication.sharedApplication.applicationIconImage]; _mainController = [[HBController alloc] initWithDelegate:self queue:_queue presetsManager:_presetsManager]; } return self; @@ -109,9 +112,6 @@ [self showOutputPanel:nil]; } - [self.queue setEncodingJobsAsPending]; - [self.queue removeCompletedAndCancelledItems]; - // Now we re-check the queue array to see if there are // any remaining encodes to be done if (self.queue.items.count) diff --git a/macosx/HBController.m b/macosx/HBController.m index cd6a198a0..99510e8d5 100644 --- a/macosx/HBController.m +++ b/macosx/HBController.m @@ -13,6 +13,7 @@ #import "NSWindow+HBAdditions.h" #import "HBQueue.h" +#import "HBQueueWorker.h" #import "HBPresetsManager.h" #import "HBPreset.h" @@ -83,7 +84,6 @@ static void *HBControllerLogLevelContext = &HBControllerLogLevelContext; // Bottom IBOutlet NSTextField * fStatusField; - IBOutlet NSProgressIndicator * fRipIndicator; // User Preset HBPresetsManager * presetManager; @@ -130,6 +130,7 @@ static void *HBControllerLogLevelContext = &HBControllerLogLevelContext; /// The queue. @property (nonatomic, weak) HBQueue *queue; +@property (nonatomic) id observerToken; /// Whether the window is visible or occluded, /// useful to avoid updating the UI needlessly @@ -156,8 +157,8 @@ static void *HBControllerLogLevelContext = &HBControllerLogLevelContext; - (void)_touchBar_validateUserInterfaceItems; @end -#define WINDOW_HEIGHT_OFFSET_INIT 48 -#define WINDOW_HEIGHT_OFFSET 30 +#define WINDOW_HEIGHT_OFFSET_INIT 30 +#define WINDOW_HEIGHT_OFFSET 12 @implementation HBController @@ -222,7 +223,6 @@ static void *HBControllerLogLevelContext = &HBControllerLogLevelContext; // Bottom fStatusField.font = [NSFont monospacedDigitSystemFontOfSize:NSFont.smallSystemFontSize weight:NSFontWeightRegular]; - fRipIndicator.hidden = YES; [self updateProgress]; // Register HBController's Window as a receiver for files/folders drag & drop operations @@ -280,40 +280,31 @@ static void *HBControllerLogLevelContext = &HBControllerLogLevelContext; options:NSKeyValueObservingOptionNew | NSKeyValueObservingOptionInitial context:HBControllerScanCoreContext]; - [NSNotificationCenter.defaultCenter addObserverForName:HBQueueDidStartNotification object:_queue queue:NSOperationQueue.mainQueue usingBlock:^(NSNotification * _Nonnull note) { + [NSNotificationCenter.defaultCenter addObserverForName:HBQueueDidStartNotification + object:_queue queue:NSOperationQueue.mainQueue + usingBlock:^(NSNotification * _Nonnull note) { self.bottomConstrain.animator.constant = 0; - self->fRipIndicator.hidden = NO; }]; - [NSNotificationCenter.defaultCenter addObserverForName:HBQueueDidCompleteNotification object:_queue queue:NSOperationQueue.mainQueue usingBlock:^(NSNotification * _Nonnull note) { + [NSNotificationCenter.defaultCenter addObserverForName:HBQueueDidCompleteNotification + object:_queue queue:NSOperationQueue.mainQueue + usingBlock:^(NSNotification * _Nonnull note) { self.bottomConstrain.animator.constant = -WINDOW_HEIGHT_OFFSET; - self->fRipIndicator.hidden = YES; }]; - [NSNotificationCenter.defaultCenter addObserverForName:HBQueueProgressNotification object:_queue queue:NSOperationQueue.mainQueue usingBlock:^(NSNotification * _Nonnull note) { - HBQueueItem *item = self.queue.currentItem; - NSString *info; - if (item) - { - info = [NSString stringWithFormat:NSLocalizedString(@"Encoding %@\n%@", @""), - self.queue.currentItem.outputFileName, - note.userInfo[HBQueueProgressNotificationInfoKey]]; - } - else - { - info = note.userInfo[HBQueueProgressNotificationInfoKey]; - } - self.progressInfo = info; - self.progress = [note.userInfo[HBQueueProgressNotificationPercentKey] doubleValue]; + [NSNotificationCenter.defaultCenter addObserverForName:HBQueueDidStartItemNotification + object:_queue queue:NSOperationQueue.mainQueue + usingBlock:^(NSNotification * _Nonnull note) { [self setUpQueueObservers]; }]; - if (self->_visible) - { - [self updateProgress]; - } - }]; + [NSNotificationCenter.defaultCenter addObserverForName:HBQueueDidCompleteItemNotification + object:_queue queue:NSOperationQueue.mainQueue + usingBlock:^(NSNotification * _Nonnull note) { [self setUpQueueObservers]; }]; - [NSNotificationCenter.defaultCenter addObserverForName:HBQueueDidChangeStateNotification object:_queue queue:NSOperationQueue.mainQueue usingBlock:^(NSNotification * _Nonnull note) { + [NSNotificationCenter.defaultCenter addObserverForName:HBQueueDidChangeStateNotification + object:_queue queue:NSOperationQueue.mainQueue + usingBlock:^(NSNotification * _Nonnull note) { [self updateQueueUI]; + [self setUpQueueObservers]; }]; [self updateQueueUI]; @@ -334,8 +325,7 @@ static void *HBControllerLogLevelContext = &HBControllerLogLevelContext; [self.window recalculateKeyViewLoop]; } -#pragma mark - -#pragma mark Drag & drop handling +#pragma mark - Drag & drop handling - (nullable NSArray<NSURL *> *)fileURLsFromPasteboard:(NSPasteboard *)pasteboard { @@ -1030,7 +1020,7 @@ static void *HBControllerLogLevelContext = &HBControllerLogLevelContext; - (void)windowDidChangeOcclusionState:(NSNotification *)notification { - if ([self.window occlusionState] & NSWindowOcclusionStateVisible) + if (self.window.occlusionState & NSWindowOcclusionStateVisible) { self.visible = YES; [self updateProgress]; @@ -1044,7 +1034,76 @@ static void *HBControllerLogLevelContext = &HBControllerLogLevelContext; - (void)updateProgress { fStatusField.stringValue = self.progressInfo; - fRipIndicator.doubleValue = self.progress; +} + +- (void)setUpQueueObservers +{ + [self removeQueueObservers]; + + if (self->_queue.workingItemsCount > 1) + { + [self setUpForMultipleWorkers]; + } + else + { + [self setUpForSingleWorker]; + } +} + +- (void)setUpForMultipleWorkers +{ + NSString *info = [NSString stringWithFormat:NSLocalizedString(@"Encoding %lu Jobs (%lu remaining)", @""), + self->_queue.workingItemsCount, self->_queue.pendingItemsCount]; + self.progressInfo = info; + + if (self->_visible) + { + [self updateProgress]; + } +} + +- (void)setUpForSingleWorker +{ + self.progress = 0; + HBQueueItem *firstWorkingItem = nil; + for (HBQueueItem *item in self.queue.items) + { + if (item.state == HBQueueItemStateWorking) + { + firstWorkingItem = item; + break; + } + } + + if (firstWorkingItem) + { + HBQueueWorker *worker = [self.queue workerForItem:firstWorkingItem]; + + if (worker) + { + self.observerToken = [NSNotificationCenter.defaultCenter addObserverForName:HBQueueWorkerProgressNotification + object:worker queue:NSOperationQueue.mainQueue + usingBlock:^(NSNotification * _Nonnull note) { + NSString *info = [NSString stringWithFormat:NSLocalizedString(@"Encoding 1 Job (%lu remaining): %@\n%@", @""), + self->_queue.pendingItemsCount, + firstWorkingItem.outputFileName, + note.userInfo[HBQueueWorkerProgressNotificationInfoKey]]; + + self.progressInfo = info; + + if (self->_visible) + { + [self updateProgress]; + } + }]; + } + } +} + +- (void)removeQueueObservers +{ + [NSNotificationCenter.defaultCenter removeObserver:self.observerToken]; + self.observerToken = nil; } #pragma mark - Job Handling diff --git a/macosx/HBDockTextField.h b/macosx/HBDockTextField.h index d4ea07888..3a25b3d53 100644 --- a/macosx/HBDockTextField.h +++ b/macosx/HBDockTextField.h @@ -10,7 +10,6 @@ NS_ASSUME_NONNULL_BEGIN @interface HBDockTextField : NSTextField -@property (nonatomic, copy) NSString *textToDisplay; @property (nonatomic, copy) NSColor *startColor; @property (nonatomic, copy) NSColor *endColor; diff --git a/macosx/HBDockTextField.m b/macosx/HBDockTextField.m index c26b25a94..d9091af6e 100644 --- a/macosx/HBDockTextField.m +++ b/macosx/HBDockTextField.m @@ -25,7 +25,6 @@ self = [super initWithFrame:frame]; if (self) { [[self cell] setBezelStyle:NSBezelStyleRounded]; - _textToDisplay = @""; _textAttributes = [self textAttributesWithFontSize:DOCK_TEXTFIELD_FONTSIZE]; _smallTextAttributes = [self textAttributesWithFontSize:DOCK_TEXTFIELD_FONTSIZE - 2]; [self changeGradientColors:[NSColor grayColor] endColor:[NSColor blackColor]]; @@ -67,7 +66,7 @@ [self.gradient drawInBezierPath:[NSBezierPath bezierPathWithRoundedRect:blackOutlineFrame xRadius:radius yRadius:radius] angle:90]; NSDictionary *attributes = self.textAttributes; - NSString *budgetString = _textToDisplay; + NSString *budgetString = self.stringValue; NSSize stringSize = [budgetString sizeWithAttributes:attributes]; if (size.width - 4 < stringSize.width) diff --git a/macosx/HBDockTile.h b/macosx/HBDockTile.h index 3fcc61cc4..a247d651b 100644 --- a/macosx/HBDockTile.h +++ b/macosx/HBDockTile.h @@ -13,12 +13,14 @@ NS_ASSUME_NONNULL_BEGIN - (instancetype)init NS_UNAVAILABLE; - (instancetype)initWithDockTile:(NSDockTile *)dockTile image:(NSImage *)image NS_DESIGNATED_INITIALIZER; +@property (nonatomic, copy) NSString *stringValue; + /** * Updates two DockTextFields on the dockTile, * one with total percentage, the other one with the ETA. * The ETA string is formatted by the callers * */ -- (void)updateDockIcon:(double)progress withETA:(NSString *)etaStr; +- (void)setProgress:(double)progress ETA:(NSString *)etaStr; /** @@ -30,7 +32,7 @@ NS_ASSUME_NONNULL_BEGIN * When these conditions doesn't applied (eg. when ETA is undefined) * we show just a tilde (~) */ -- (void)updateDockIcon:(double)progress hours:(NSInteger)hours minutes:(NSInteger)minutes seconds:(NSInteger)seconds; +- (void)setProgress:(double)progress hours:(NSInteger)hours minutes:(NSInteger)minutes seconds:(NSInteger)seconds; @end diff --git a/macosx/HBDockTile.m b/macosx/HBDockTile.m index 894f5ca90..ececacc0a 100644 --- a/macosx/HBDockTile.m +++ b/macosx/HBDockTile.m @@ -7,8 +7,6 @@ #import "HBDockTile.h" #import "HBDockTextField.h" -NSString *dockTilePercentFormat = @"%2.1f%%"; - @interface HBDockTile () @property (nonatomic, strong) NSDockTile *dockTile; @@ -34,39 +32,56 @@ NSString *dockTilePercentFormat = @"%2.1f%%"; _image = image; NSImageView *iv = [[NSImageView alloc] init]; - [iv setImage:_image]; - [dockTile setContentView:iv]; + iv.image = _image; + dockTile.contentView = iv; - _percentField = [[HBDockTextField alloc] initWithFrame:NSMakeRect(0.0f, 32.0f, [dockTile size].width, 30.0f)]; + _percentField = [[HBDockTextField alloc] initWithFrame:NSMakeRect(0.0f, 32.0f, dockTile.size.width, 30.0f)]; [_percentField changeGradientColors:[NSColor colorWithDeviceRed:0.4f green:0.6f blue:0.4f alpha:1.0f] endColor:[NSColor colorWithDeviceRed:0.2f green:0.4f blue:0.2f alpha:1.0f]]; [iv addSubview:_percentField]; - _timeField = [[HBDockTextField alloc] initWithFrame:NSMakeRect(0.0f, 0.0f, [dockTile size].width, 30.0f)]; + _timeField = [[HBDockTextField alloc] initWithFrame:NSMakeRect(0.0f, 0.0f, dockTile.size.width, 30.0f)]; [_timeField changeGradientColors:[NSColor colorWithDeviceRed:0.6f green:0.4f blue:0.4f alpha:1.0f] endColor:[NSColor colorWithDeviceRed:0.4f green:0.2f blue:0.2f alpha:1.0f]]; [iv addSubview:_timeField]; } return self; } -- (void)updateDockIcon:(double)progress withETA:(NSString *)etaStr +- (void)setStringValue:(NSString *)stringValue +{ + if (stringValue.length) + { + _timeField.hidden = NO; + _timeField.stringValue = stringValue; + } + else + { + _timeField.hidden = YES; + _timeField.stringValue = @""; + } + + _percentField.hidden = YES; + [_dockTile display]; +} + +- (void)setProgress:(double)progress ETA:(NSString *)etaStr { if (progress < 0.0 || progress > 1.0) { - [_percentField setHidden:YES]; - [_timeField setHidden:YES]; + _percentField.hidden = YES; + _timeField.hidden =YES; } else { - [_percentField setTextToDisplay:[NSString stringWithFormat:dockTilePercentFormat, progress * 100]]; - [_percentField setHidden:NO]; - [_timeField setTextToDisplay:etaStr]; - [_timeField setHidden:NO]; + _percentField.stringValue = [NSString stringWithFormat:@"%2.1f%%", progress * 100]; + _percentField.hidden = NO; + _timeField.stringValue = etaStr; + _timeField.hidden =NO; } [_dockTile display]; } -- (void)updateDockIcon:(double)progress hours:(NSInteger)hours minutes:(NSInteger)minutes seconds:(NSInteger)seconds +- (void)setProgress:(double)progress hours:(NSInteger)hours minutes:(NSInteger)minutes seconds:(NSInteger)seconds { // ETA format is [XX]X:XX:XX when ETA is greater than one hour // [X]X:XX when ETA is greater than 0 (minutes or seconds) @@ -87,8 +102,7 @@ NSString *dockTilePercentFormat = @"%2.1f%%"; etaStr = @"~"; } - [self updateDockIcon:progress withETA:etaStr]; - + [self setProgress:progress ETA:etaStr]; } diff --git a/macosx/HBPreferencesController.m b/macosx/HBPreferencesController.m index 2540f69f0..3f6c085c3 100644 --- a/macosx/HBPreferencesController.m +++ b/macosx/HBPreferencesController.m @@ -38,6 +38,7 @@ NSString * const HBClearOldLogs = @"HBClearOldLogs"; NSString * const HBQueuePauseIfLowSpace = @"HBQueuePauseIfLowSpace"; NSString * const HBQueueMinFreeSpace = @"HBQueueMinFreeSpace"; NSString * const HBQueueAutoClearCompletedItems = @"HBQueueAutoClearCompletedItems"; +NSString * const HBQueueWorkerCounts = @"HBQueueWorkerCounts"; #define TOOLBAR_GENERAL @"TOOLBAR_GENERAL" #define TOOLBAR_ADVANCED @"TOOLBAR_ADVANCED" @@ -82,7 +83,7 @@ NSString * const HBQueueAutoClearCompletedItems = @"HBQueueAutoClearCompletedIt [[NSUserDefaults standardUserDefaults] registerDefaults:@{ HBShowOpenPanelAtLaunch: @YES, HBShowSummaryPreview: @YES, - HBDefaultMpegExtension: @"Auto", + HBDefaultMpegExtension: @".mp4", HBUseDvdNav: @YES, HBLastDestinationDirectoryURL: [NSKeyedArchiver archivedDataWithRootObject:moviesURL], HBLastSourceDirectoryURL: [NSKeyedArchiver archivedDataWithRootObject:moviesURL], @@ -99,8 +100,9 @@ NSString * const HBQueueAutoClearCompletedItems = @"HBQueueAutoClearCompletedIt HBCqSliderFractional: @2, HBQueuePauseIfLowSpace: @YES, HBQueueMinFreeSpace: @"2", - HBQueueAutoClearCompletedItems: @NO - }]; + HBQueueAutoClearCompletedItems: @NO, + HBQueueWorkerCounts: @1 + }]; // Overwrite the update check interval because previous versions // could be set to a daily check. diff --git a/macosx/HBPreferencesKeys.h b/macosx/HBPreferencesKeys.h index 2ab539044..2b60b3591 100644 --- a/macosx/HBPreferencesKeys.h +++ b/macosx/HBPreferencesKeys.h @@ -50,4 +50,6 @@ extern NSString * const HBQueuePauseIfLowSpace; extern NSString * const HBQueueMinFreeSpace; extern NSString * const HBQueueAutoClearCompletedItems; +extern NSString * const HBQueueWorkerCounts; + #endif /* HBPreferencesKeys_h */ diff --git a/macosx/HBPresetsMenuBuilder.m b/macosx/HBPresetsMenuBuilder.m index 4db86f8d6..fa296c228 100644 --- a/macosx/HBPresetsMenuBuilder.m +++ b/macosx/HBPresetsMenuBuilder.m @@ -32,11 +32,6 @@ return self; } -- (void)dealloc -{ - [NSNotificationCenter.defaultCenter removeObserver:self]; -} - /** * Adds the presets list to the menu. */ diff --git a/macosx/HBQueue.h b/macosx/HBQueue.h index 2612ee3fa..ad8e6517a 100644 --- a/macosx/HBQueue.h +++ b/macosx/HBQueue.h @@ -7,11 +7,10 @@ #import <Foundation/Foundation.h> #import "HBQueueItem.h" +#import "HBQueueWorker.h" NS_ASSUME_NONNULL_BEGIN -extern NSString * const HBQueueDidChangeStateNotification; - extern NSString * const HBQueueDidAddItemNotification; extern NSString * const HBQueueDidRemoveItemNotification; extern NSString * const HBQueueDidChangeItemNotification; @@ -21,19 +20,11 @@ extern NSString * const HBQueueDidMoveItemNotification; extern NSString * const HBQueueItemNotificationSourceIndexesKey; // NSArray<NSNumber *> extern NSString * const HBQueueItemNotificationTargetIndexesKey; // NSArray<NSNumber *> -extern NSString * const HBQueueReloadItemsNotification; - extern NSString * const HBQueueLowSpaceAlertNotification; -extern NSString * const HBQueueProgressNotification; -extern NSString * const HBQueueProgressNotificationPercentKey; // NSNumber - double -extern NSString * const HBQueueProgressNotificationHoursKey; // NSNumber - double -extern NSString * const HBQueueProgressNotificationMinutesKey; // NSNumber - double -extern NSString * const HBQueueProgressNotificationSecondsKey; // NSNumber - double -extern NSString * const HBQueueProgressNotificationInfoKey; // NSString - extern NSString * const HBQueueDidStartNotification; extern NSString * const HBQueueDidCompleteNotification; +extern NSString * const HBQueueDidChangeStateNotification; extern NSString * const HBQueueDidStartItemNotification; extern NSString * const HBQueueDidCompleteItemNotification; @@ -46,11 +37,12 @@ extern NSString * const HBQueueItemNotificationItemKey; // HBQueueI @property (nonatomic, readonly) NSArray<HBQueueItem *> *items; -@property (nonatomic, nullable) HBQueueItem *currentItem; +@property (nonatomic, readonly) NSUInteger pendingItemsCount; +@property (nonatomic, readonly) NSUInteger failedItemsCount; +@property (nonatomic, readonly) NSUInteger completedItemsCount; +@property (nonatomic, readonly) NSUInteger workingItemsCount; -@property (nonatomic) NSUInteger pendingItemsCount; -@property (nonatomic) NSUInteger failedItemsCount; -@property (nonatomic) NSUInteger completedItemsCount; +@property (nonatomic, readonly) NSUInteger workersCount; @property (nonatomic) NSUndoManager *undoManager; @@ -72,15 +64,14 @@ extern NSString * const HBQueueItemNotificationItemKey; // HBQueueI - (void)resetAllItems; - (void)resetFailedItems; -- (void)setEncodingJobsAsPending; - @property (nonatomic, readonly) BOOL canEncode; @property (nonatomic, readonly) BOOL isEncoding; - (void)start; -- (void)cancelCurrentItemAndContinue; +- (void)cancelCurrentAndContinue; +- (void)cancelCurrentAndStop; - (void)finishCurrentAndStop; -- (void)cancelCurrentItemAndStop; +- (void)cancelItemsAtIndexes:(NSIndexSet *)indexes; @property (nonatomic, readonly) BOOL canPause; - (void)pause; @@ -88,6 +79,8 @@ extern NSString * const HBQueueItemNotificationItemKey; // HBQueueI @property (nonatomic, readonly) BOOL canResume; - (void)resume; +- (nullable HBQueueWorker *)workerForItem:(HBQueueItem *)item; + @end NS_ASSUME_NONNULL_END diff --git a/macosx/HBQueue.m b/macosx/HBQueue.m index 8036696a8..5dc7db892 100644 --- a/macosx/HBQueue.m +++ b/macosx/HBQueue.m @@ -6,13 +6,12 @@ #import "HBQueue.h" #import "HBRemoteCore.h" +#import "HBQueueWorker.h" #import "HBPreferencesKeys.h" #import "NSArray+HBAdditions.h" -#import "HBJobOutputFileWriter.h" -static void *HBQueueContext = &HBQueueContext; -static void *HBQueueLogLevelContext = &HBQueueLogLevelContext; +#import <IOKit/pwr_mgt/IOPMLib.h> NSString * const HBQueueDidChangeStateNotification = @"HBQueueDidChangeStateNotification"; @@ -20,23 +19,14 @@ NSString * const HBQueueDidAddItemNotification = @"HBQueueDidAddItemNotification NSString * const HBQueueDidRemoveItemNotification = @"HBQueueDidRemoveItemNotification"; NSString * const HBQueueDidChangeItemNotification = @"HBQueueDidChangeItemNotification"; -NSString * const HBQueueItemNotificationIndexesKey = @"HBQueueReloadItemsNotification"; +NSString * const HBQueueItemNotificationIndexesKey = @"HBQueueItemNotificationIndexesKey"; NSString * const HBQueueDidMoveItemNotification = @"HBQueueDidMoveItemNotification"; NSString * const HBQueueItemNotificationSourceIndexesKey = @"HBQueueItemNotificationSourceIndexesKey"; NSString * const HBQueueItemNotificationTargetIndexesKey = @"HBQueueItemNotificationTargetIndexesKey"; -NSString * const HBQueueReloadItemsNotification = @"HBQueueReloadItemsNotification"; - NSString * const HBQueueLowSpaceAlertNotification = @"HBQueueLowSpaceAlertNotification"; -NSString * const HBQueueProgressNotification = @"HBQueueProgressNotification"; -NSString * const HBQueueProgressNotificationPercentKey = @"HBQueueProgressNotificationPercentKey"; -NSString * const HBQueueProgressNotificationHoursKey = @"HBQueueProgressNotificationHoursKey"; -NSString * const HBQueueProgressNotificationMinutesKey = @"HBQueueProgressNotificationMinutesKey"; -NSString * const HBQueueProgressNotificationSecondsKey = @"HBQueueProgressNotificationSecondsKey"; -NSString * const HBQueueProgressNotificationInfoKey = @"HBQueueProgressNotificationInfoKey"; - NSString * const HBQueueDidStartNotification = @"HBQueueDidStartNotification"; NSString * const HBQueueDidCompleteNotification = @"HBQueueDidCompleteNotification"; @@ -46,67 +36,89 @@ NSString * const HBQueueItemNotificationItemKey = @"HBQueueItemNotificationItemK @interface HBQueue () -@property (nonatomic, readonly) HBRemoteCore *core; -@property (nonatomic) BOOL stop; - -@property (nonatomic, nullable) HBJobOutputFileWriter *currentLog; - @property (nonatomic, readonly) NSURL *fileURL; + @property (nonatomic, readonly) NSMutableArray<HBQueueItem *> *itemsInternal; +@property (nonatomic, readonly) NSArray<HBQueueWorker *> *workers; + +@property (nonatomic) IOPMAssertionID assertionID; +@property (nonatomic) BOOL stop; + +@property (nonatomic) NSUInteger pendingItemsCount; +@property (nonatomic) NSUInteger failedItemsCount; +@property (nonatomic) NSUInteger completedItemsCount; +@property (nonatomic) NSUInteger workingItemsCount; @end @implementation HBQueue +- (void)setUpWorkers +{ + NSArray<NSString *> *xpcServiceNames = @[@"fr.handbrake.HandBrakeXPCService", @"fr.handbrake.HandBrakeXPCService2", + @"fr.handbrake.HandBrakeXPCService3", @"fr.handbrake.HandBrakeXPCService4"]; + + NSMutableArray<HBQueueWorker *> *workers = [[NSMutableArray alloc] init]; + for (NSString *xpcServiceName in xpcServiceNames) + { + HBQueueWorker *worker = [[HBQueueWorker alloc] initWithXPCServiceName:xpcServiceName]; + [workers addObject:worker]; + } + _workers = [workers copy]; +} + +- (void)setUpObservers +{ + for (HBQueueWorker *worker in _workers) + { + [NSNotificationCenter.defaultCenter addObserverForName:HBQueueWorkerDidChangeStateNotification + object:worker + queue:NSOperationQueue.mainQueue + usingBlock:^(NSNotification * _Nonnull note) { + [NSNotificationCenter.defaultCenter postNotificationName:HBQueueDidChangeStateNotification object:self]; + }]; + + [NSNotificationCenter.defaultCenter addObserverForName:HBQueueWorkerDidStartItemNotification + object:worker + queue:NSOperationQueue.mainQueue + usingBlock:^(NSNotification * _Nonnull note) { + [self updateStats]; + HBQueueItem *item = note.userInfo[HBQueueWorkerItemNotificationItemKey]; + [NSNotificationCenter.defaultCenter postNotificationName:HBQueueDidStartItemNotification object:self userInfo:@{HBQueueItemNotificationItemKey: item}]; + }]; + + [NSNotificationCenter.defaultCenter addObserverForName:HBQueueWorkerDidCompleteItemNotification + object:worker + queue:NSOperationQueue.mainQueue + usingBlock:^(NSNotification * _Nonnull note) { + [self updateStats]; + HBQueueItem *item = note.userInfo[HBQueueWorkerItemNotificationItemKey]; + [NSNotificationCenter.defaultCenter postNotificationName:HBQueueDidCompleteItemNotification object:self userInfo:@{HBQueueItemNotificationItemKey: item}]; + [self completedItem:item]; + }]; + } +} + - (instancetype)initWithURL:(NSURL *)fileURL { self = [super init]; if (self) { - NSInteger loggingLevel = [NSUserDefaults.standardUserDefaults integerForKey:HBLoggingLevel]; - - _core = [[HBRemoteCore alloc] initWithLogLevel:loggingLevel name:@"QueueCore"]; - _core.automaticallyPreventSleep = NO; - _fileURL = fileURL; _itemsInternal = [self load]; _undoManager = [[NSUndoManager alloc] init]; + _assertionID = -1; + [self setEncodingJobsAsPending]; + [self removeCompletedAndCancelledItems]; [self updateStats]; - // Set up observers - [self.core addObserver:self forKeyPath:@"state" - options:NSKeyValueObservingOptionNew | NSKeyValueObservingOptionInitial - context:HBQueueContext]; - - [NSUserDefaultsController.sharedUserDefaultsController addObserver:self forKeyPath:@"values.LoggingLevel" - options:0 context:HBQueueLogLevelContext]; + [self setUpWorkers]; + [self setUpObservers]; } return self; } -- (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context -{ - if (context == HBQueueContext) - { - [NSNotificationCenter.defaultCenter postNotificationName:HBQueueDidChangeStateNotification object:self]; - } - else if (context == HBQueueLogLevelContext) - { - self.core.logLevel = [NSUserDefaults.standardUserDefaults integerForKey:HBLoggingLevel]; - } - else - { - [super observeValueForKeyPath:keyPath ofObject:object change:change context:context]; - } -} - -- (void)dealloc -{ - [self.core removeObserver:self forKeyPath:@"state"]; - [self.core invalidate]; -} - #pragma mark - Load and save - (NSMutableArray *)load @@ -141,14 +153,19 @@ NSString * const HBQueueItemNotificationItemKey = @"HBQueueItemNotificationItemK } } - #pragma mark - Public methods -- (NSArray *)items +- (NSArray<HBQueueItem *> *)items { return self.itemsInternal; } +- (NSUInteger)workersCount +{ + NSUInteger count = [NSUserDefaults.standardUserDefaults integerForKey:HBQueueWorkerCounts]; + return count > 0 && count <= 4 ? count : 1; +} + - (void)addJob:(HBJob *)item { NSParameterAssert(item); @@ -441,8 +458,6 @@ NSString * const HBQueueItemNotificationItemKey = @"HBQueueItemNotificationItemK } [self updateStats]; - [NSNotificationCenter.defaultCenter postNotificationName:HBQueueDidChangeItemNotification object:self userInfo:@{HBQueueItemNotificationIndexesKey: indexes}]; - [self save]; } @@ -453,40 +468,120 @@ NSString * const HBQueueItemNotificationItemKey = @"HBQueueItemNotificationItemK - (BOOL)isEncoding { - HBState s = self.core.state; - return self.currentItem || (s == HBStateScanning) || (s == HBStatePaused) || (s == HBStateWorking) || (s == HBStateMuxing) || (s == HBStateSearching); + BOOL isEncoding = NO; + for (HBQueueWorker *worker in self.workers) + { + isEncoding |= worker.isEncoding; + } + + return isEncoding; +} + +- (NSUInteger)countOfEncodings +{ + NSUInteger count = 0; + for (HBQueueWorker *worker in self.workers) + { + count += worker.isEncoding ? 1 : 0; + } + + return count; } - (BOOL)canPause { - HBState s = self.core.state; - return (s == HBStateWorking || s == HBStateMuxing); + BOOL canPause = NO; + for (HBQueueWorker *worker in self.workers) + { + if (worker.isEncoding) + { + canPause |= worker.canPause; + } + } + + return canPause; } - (void)pause { - [self.currentItem pausedAtDate:[NSDate date]]; - [self.core pause]; - [self.core allowSleep]; + for (HBQueueWorker *worker in self.workers) + { + if (worker.canPause) + { + [worker pause]; + } + } + [self allowSleep]; } - (BOOL)canResume { - return self.core.state == HBStatePaused; + BOOL canResume = NO; + for (HBQueueWorker *worker in self.workers) + { + if (worker.isEncoding) + { + canResume |= worker.canResume; + } + } + + return canResume; } - (void)resume { - [self.currentItem resumedAtDate:[NSDate date]]; - [self.core resume]; - [self.core preventSleep]; + for (HBQueueWorker *worker in self.workers) + { + if (worker.canResume) + { + [worker resume]; + } + } + [self preventSleep]; +} + +#pragma mark - Sleep + +- (void)preventSleep +{ + if (_assertionID != -1) + { + // nothing to do + return; + } + + CFStringRef reasonForActivity= CFSTR("HandBrake is currently scanning and/or encoding"); + + IOReturn success = IOPMAssertionCreateWithName(kIOPMAssertPreventUserIdleSystemSleep, + kIOPMAssertionLevelOn, reasonForActivity, &_assertionID); + + if (success != kIOReturnSuccess) + { + [HBUtilities writeToActivityLog:"HBRemoteCore: failed to prevent system sleep"]; + } +} + +- (void)allowSleep +{ + if (_assertionID == -1) + { + // nothing to do + return; + } + + IOReturn success = IOPMAssertionRelease(_assertionID); + + if (success == kIOReturnSuccess) + { + _assertionID = -1; + } } #pragma mark - Private queue editing methods - (void)updateStats { - NSUInteger pendingCount = 0, failedCount = 0, completedCount = 0; + NSUInteger pendingCount = 0, failedCount = 0, completedCount = 0, workingCount = 0; for (HBQueueItem *item in self.itemsInternal) { @@ -502,11 +597,16 @@ NSString * const HBQueueItemNotificationItemKey = @"HBQueueItemNotificationItemK { failedCount++; } + else if (item.state == HBQueueItemStateWorking) + { + workingCount++; + } } self.pendingItemsCount = pendingCount; self.failedItemsCount = failedCount; self.completedItemsCount = completedCount; + self.workingItemsCount = workingCount; [NSNotificationCenter.defaultCenter postNotificationName:HBQueueDidChangeStateNotification object:self]; } @@ -542,7 +642,7 @@ NSString * const HBQueueItemNotificationItemKey = @"HBQueueItemNotificationItemK /** * Used to get the next pending queue item and return it if found */ -- (HBQueueItem *)getNextPendingQueueItem +- (HBQueueItem *)nextPendingQueueItem { for (HBQueueItem *item in self.itemsInternal) { @@ -554,12 +654,25 @@ NSString * const HBQueueItemNotificationItemKey = @"HBQueueItemNotificationItemK return nil; } +- (HBQueueWorker *)firstAvailableWorker +{ + for (HBQueueWorker *worker in self.workers) + { + if (worker.isEncoding == NO) + { + return worker; + } + } + return nil; +} + - (void)start { if (self.canEncode) { + self.stop = NO; [NSNotificationCenter.defaultCenter postNotificationName:HBQueueDidStartNotification object:self]; - [self.core preventSleep]; + [self preventSleep]; [self encodeNextQueueItem]; } } @@ -572,249 +685,93 @@ NSString * const HBQueueItemNotificationItemKey = @"HBQueueItemNotificationItemK // since we have completed an encode, we go to the next if (self.stop) { - [HBUtilities writeToActivityLog:"Queue manually stopped"]; - - self.stop = NO; - [self.core allowSleep]; - - [NSNotificationCenter.defaultCenter postNotificationName:HBQueueDidCompleteNotification object:self]; + if (self.isEncoding == NO) + { + [HBUtilities writeToActivityLog:"Queue manually stopped"]; + [self allowSleep]; + [NSNotificationCenter.defaultCenter postNotificationName:HBQueueDidCompleteNotification object:self]; + } } else { // Check to see if there are any more pending items in the queue - HBQueueItem *nextItem = [self getNextPendingQueueItem]; + HBQueueItem *nextItem = self.nextPendingQueueItem; + HBQueueWorker *worker = self.firstAvailableWorker; if (nextItem && [self isDiskSpaceLowAtURL:nextItem.outputURL]) { // Disk space is low, show an alert [HBUtilities writeToActivityLog:"Queue Stopped, low space on destination disk"]; - [self.core allowSleep]; + [self allowSleep]; + + [self pause]; [NSNotificationCenter.defaultCenter postNotificationName:HBQueueDidCompleteNotification object:self]; [NSNotificationCenter.defaultCenter postNotificationName:HBQueueLowSpaceAlertNotification object:self]; } // If we still have more pending items in our queue, lets go to the next one - else if (nextItem) + else if (nextItem && worker && self.countOfEncodings < self.workersCount) { - // now we mark the queue item as working so another instance can not come along and try to scan it while we are scanning - nextItem.startedDate = [NSDate date]; - nextItem.state = HBQueueItemStateWorking; + [worker encodeItem:nextItem]; - // Tell HB to output a new activity log file for this encode - self.currentLog = [[HBJobOutputFileWriter alloc] initWithJob:nextItem.job]; - if (self.currentLog) - { - nextItem.activityLogURL = self.currentLog.url; + // Erase undo manager history + [self.undoManager removeAllActions]; - dispatch_queue_t mainQueue = dispatch_get_main_queue(); - [self.core.stderrRedirect addListener:self.currentLog queue:mainQueue]; - [self.core.stdoutRedirect addListener:self.currentLog queue:mainQueue]; + if (self.firstAvailableWorker) + { + [self encodeNextQueueItem]; } - - self.currentItem = nextItem; - NSIndexSet *indexes = [NSIndexSet indexSetWithIndex:[self.itemsInternal indexOfObject:nextItem]]; - - [NSNotificationCenter.defaultCenter postNotificationName:HBQueueDidStartItemNotification object:self userInfo:@{HBQueueItemNotificationItemKey: nextItem, - HBQueueItemNotificationIndexesKey: indexes}]; - - // now we can go ahead and scan the new pending queue item - [self encodeItem:nextItem]; - - // erase undo manager history - [self.undoManager removeAllActions]; } - else + else if (self.isEncoding == NO) { [HBUtilities writeToActivityLog:"Queue Done, there are no more pending encodes"]; - [self.core allowSleep]; + [self allowSleep]; [NSNotificationCenter.defaultCenter postNotificationName:HBQueueDidCompleteNotification object:self]; } } - [self updateStats]; - - [NSNotificationCenter.defaultCenter postNotificationName:HBQueueDidChangeStateNotification object:self]; - [self save]; } -- (void)completedItem:(HBQueueItem *)item result:(HBCoreResult)result +- (void)completedItem:(HBQueueItem *)item { NSParameterAssert(item); - - item.endedDate = [NSDate date]; - - // Since we are done with this encode, tell output to stop writing to the - // individual encode log. - [self.core.stderrRedirect removeListener:self.currentLog]; - [self.core.stdoutRedirect removeListener:self.currentLog]; - - self.currentLog = nil; - - // Mark the encode just finished - switch (result) { - case HBCoreResultDone: - item.state = HBQueueItemStateCompleted; - break; - case HBCoreResultCanceled: - item.state = HBQueueItemStateCanceled; - break; - default: - item.state = HBQueueItemStateFailed; - break; - } - - // Update UI - NSString *info = nil; - switch (result) { - case HBCoreResultDone: - info = NSLocalizedString(@"Encode Finished.", @"Queue status"); - break; - case HBCoreResultCanceled: - info = NSLocalizedString(@"Encode Canceled.", @"Queue status"); - break; - default: - info = NSLocalizedString(@"Encode Failed.", @"Queue status"); - break; - } - - self.currentItem = nil; - - [NSNotificationCenter.defaultCenter postNotificationName:HBQueueProgressNotification object:self userInfo:@{HBQueueProgressNotificationPercentKey: @1.0, - HBQueueProgressNotificationInfoKey: info}]; - - NSUInteger index = [self.itemsInternal indexOfObject:item]; - NSIndexSet *indexes = index != NSNotFound ? [NSIndexSet indexSetWithIndex:index] : [NSIndexSet indexSet]; - [NSNotificationCenter.defaultCenter postNotificationName:HBQueueDidCompleteItemNotification object:self userInfo:@{HBQueueItemNotificationItemKey: item, - HBQueueItemNotificationIndexesKey: indexes}]; - [self save]; + [self encodeNextQueueItem]; } /** - * Here we actually tell hb_scan to perform the source scan, using the path to source and title number - */ -- (void)encodeItem:(HBQueueItem *)item -{ - NSParameterAssert(item); - - // Progress handler - void (^progressHandler)(HBState state, HBProgress progress, NSString *info) = ^(HBState state, HBProgress progress, NSString *info) - { - [NSNotificationCenter.defaultCenter postNotificationName:HBQueueProgressNotification object:self userInfo:@{HBQueueProgressNotificationPercentKey: @0, - HBQueueProgressNotificationInfoKey: info}]; - }; - - // Completion handler - void (^completionHandler)(HBCoreResult result) = ^(HBCoreResult result) - { - if (result == HBCoreResultDone) - { - [self realEncodeItem:item]; - } - else - { - [self completedItem:item result:result]; - [self encodeNextQueueItem]; - } - }; - - [item.job refreshSecurityScopedResources]; - - // Only scan 10 previews before an encode - additional previews are - // only useful for autocrop and static previews, which are already taken care of at this point - [self.core scanURL:item.fileURL - titleIndex:item.job.titleIdx - previews:10 - minDuration:0 - keepPreviews:NO - progressHandler:progressHandler - completionHandler:completionHandler]; -} - -/** - * This assumes that we have re-scanned and loaded up a new queue item to send to libhb + * Cancels the current job */ -- (void)realEncodeItem:(HBQueueItem *)item +- (void)doCancelAll { - NSParameterAssert(item); - - HBJob *job = item.job; - - NSParameterAssert(job); - - // Progress handler - void (^progressHandler)(HBState state, HBProgress progress, NSString *info) = ^(HBState state, HBProgress progress, NSString *info) + for (HBQueueWorker *worker in self.workers) { - if (state == HBStateMuxing) + if (worker.isEncoding) { - [NSNotificationCenter.defaultCenter postNotificationName:HBQueueProgressNotification - object:self - userInfo:@{HBQueueProgressNotificationPercentKey: @1, - HBQueueProgressNotificationInfoKey: info}]; + [worker cancel]; } - else - { - [NSNotificationCenter.defaultCenter postNotificationName:HBQueueProgressNotification - object:self - userInfo:@{HBQueueProgressNotificationPercentKey: @(progress.percent), - HBQueueProgressNotificationHoursKey: @(progress.hours), - HBQueueProgressNotificationMinutesKey: @(progress.minutes), - HBQueueProgressNotificationSecondsKey: @(progress.seconds), - HBQueueProgressNotificationInfoKey: info}]; - } - }; - - // Completion handler - void (^completionHandler)(HBCoreResult result) = ^(HBCoreResult result) - { - [self completedItem:item result:result]; - - if ([NSUserDefaults.standardUserDefaults boolForKey:HBQueueAutoClearCompletedItems]) - { - [self removeCompletedItems]; - } - - [self encodeNextQueueItem]; - }; - - // We should be all setup so let 'er rip - [self.core encodeJob:job progressHandler:progressHandler completionHandler:completionHandler]; -} - -/** - * Cancels the current job - */ -- (void)doCancelCurrentItem -{ - if (self.core.state == HBStateScanning) - { - [self.core cancelScan]; - } - else - { - [self.core cancelEncode]; } } /** * Cancels the current job and starts processing the next in queue. */ -- (void)cancelCurrentItemAndContinue +- (void)cancelCurrentAndContinue { - [self doCancelCurrentItem]; + [self doCancelAll]; } /** * Cancels the current job and stops libhb from processing the remaining encodes. */ -- (void)cancelCurrentItemAndStop +- (void)cancelCurrentAndStop { - if (self.core.state != HBStateIdle) + if (self.isEncoding) { self.stop = YES; - [self doCancelCurrentItem]; + [self doCancelAll]; } } @@ -823,10 +780,35 @@ NSString * const HBQueueItemNotificationItemKey = @"HBQueueItemNotificationItemK */ - (void)finishCurrentAndStop { - if (self.core.state != HBStateIdle) + if (self.isEncoding) { self.stop = YES; } } +- (void)cancelItemsAtIndexes:(NSIndexSet *)indexes +{ + NSArray<HBQueueItem *> *items = [self.items objectsAtIndexes:indexes]; + + for (HBQueueItem *item in items) { + for (HBQueueWorker *worker in self.workers) { + if (worker.item == item) { + [worker cancel]; + } + } + } +} + +- (nullable HBQueueWorker *)workerForItem:(HBQueueItem *)item +{ + for (HBQueueWorker *worker in self.workers) + { + if (worker.item == item) + { + return worker; + } + } + return nil; +} + @end diff --git a/macosx/HBQueueController.m b/macosx/HBQueueController.m index 703ec9a4d..02def9878 100644 --- a/macosx/HBQueueController.m +++ b/macosx/HBQueueController.m @@ -9,12 +9,12 @@ #import "HBAppDelegate.h" #import "HBQueue.h" +#import "HBQueueWorker.h" #import "HBQueueTableViewController.h" #import "HBQueueDetailsViewController.h" #import "HBQueueInfoViewController.h" #import "HBQueueMultiSelectionViewController.h" -#import "HBDockTile.h" #import "HBPreferencesKeys.h" #import "NSArray+HBAdditions.h" @@ -32,8 +32,6 @@ /// useful to avoid updating the UI needlessly @property (nonatomic) BOOL visible; -@property (nonatomic, readonly) HBDockTile *dockTile; - @property (nonatomic) IBOutlet NSToolbarItem *ripToolbarItem; @property (nonatomic) IBOutlet NSToolbarItem *pauseToolbarItem; @@ -56,11 +54,9 @@ if (self = [super initWithWindowNibName:@"Queue"]) { _queue = queue; + _sendQueue = dispatch_queue_create("fr.handbrake.SendToQueue", DISPATCH_QUEUE_SERIAL); - // Load the dockTile and instantiate initial text fields - _dockTile = [[HBDockTile alloc] initWithDockTile:NSApplication.sharedApplication.dockTile - image:NSApplication.sharedApplication.applicationIconImage]; - __block double dockIconProgress; + NSUserNotificationCenter.defaultUserNotificationCenter.delegate = self; [NSNotificationCenter.defaultCenter addObserverForName:HBQueueLowSpaceAlertNotification object:_queue queue:NSOperationQueue.mainQueue usingBlock:^(NSNotification * _Nonnull note) { [self queueLowDiskSpaceAlert]; @@ -70,28 +66,7 @@ [self queueCompletedAlerts]; }]; - [NSNotificationCenter.defaultCenter addObserverForName:HBQueueProgressNotification object:_queue queue:NSOperationQueue.mainQueue usingBlock:^(NSNotification * _Nonnull note) { - // Update dock icon - double progress = [note.userInfo[HBQueueProgressNotificationPercentKey] doubleValue]; - -#define dockTileUpdateFrequency 0.1f - - if (dockIconProgress < 100.0 * progress) - { - double hours = [note.userInfo[HBQueueProgressNotificationHoursKey] doubleValue]; - double minutes = [note.userInfo[HBQueueProgressNotificationMinutesKey] doubleValue]; - double seconds = [note.userInfo[HBQueueProgressNotificationSecondsKey] doubleValue]; - - [self.dockTile updateDockIcon:progress hours:hours minutes:minutes seconds:seconds]; - dockIconProgress += dockTileUpdateFrequency; - } - }]; - [NSNotificationCenter.defaultCenter addObserverForName:HBQueueDidCompleteItemNotification object:_queue queue:NSOperationQueue.mainQueue usingBlock:^(NSNotification * _Nonnull note) { - // Restore dock icon - [self.dockTile updateDockIcon:-1.0 withETA:@""]; - dockIconProgress = 0; - // Run the per item notification and actions HBQueueItem *item = note.userInfo[HBQueueItemNotificationItemKey]; if (item.state == HBQueueItemStateCompleted) @@ -104,10 +79,6 @@ [self itemCompletedAlerts:item]; } }]; - - NSUserNotificationCenter.defaultUserNotificationCenter.delegate = self; - - _sendQueue = dispatch_queue_create("fr.handbrake.SendToQueue", DISPATCH_QUEUE_SERIAL); } return self; @@ -158,8 +129,8 @@ [NSNotificationCenter.defaultCenter addObserverForName:HBQueueDidChangeStateNotification object:_queue queue:NSOperationQueue.mainQueue usingBlock:^(NSNotification * _Nonnull note) { [self updateUI]; }]; - [self updateUI]; + [self updateUI]; [self tableViewDidSelectItemsAtIndexes:[NSIndexSet indexSet]]; } @@ -319,36 +290,30 @@ return item.state == HBQueueItemStateWorking; }]; - if ([mutableIndexes containsIndexes:workingIndexes]) + NSIndexSet *workingSelectedIndexes = [workingIndexes intersectionWith:indexes]; + [mutableIndexes removeIndexes:workingSelectedIndexes]; + + if (workingSelectedIndexes.count) { - [mutableIndexes removeIndexes:workingIndexes]; - NSArray<HBQueueItem *> *workingItems = [self.queue.items filteredArrayUsingBlock:^BOOL(HBQueueItem *item) { - return item.state == HBQueueItemStateWorking; - }]; + NSString *alertTitle = [NSString stringWithFormat:NSLocalizedString(@"Stop This Encode and Remove It?", @"Queue Stop Alert -> stop and remove message")]; - if (self.queue.currentItem && [workingItems containsObject:self.queue.currentItem]) - { - NSString *alertTitle = [NSString stringWithFormat:NSLocalizedString(@"Stop This Encode and Remove It?", @"Queue Stop Alert -> stop and remove message")]; - - // Which window to attach the sheet to? - NSWindow *targetWindow = self.window; - - NSAlert *alert = [[NSAlert alloc] init]; - [alert setMessageText:alertTitle]; - [alert setInformativeText:NSLocalizedString(@"Your movie will be lost if you don't continue encoding.", @"Queue Stop Alert -> stop and remove informative text")]; - [alert addButtonWithTitle:NSLocalizedString(@"Keep Encoding", @"Queue Stop Alert -> stop and remove first button")]; - [alert addButtonWithTitle:NSLocalizedString(@"Stop Encoding and Delete", @"Queue Stop Alert -> stop and remove second button")]; - [alert setAlertStyle:NSAlertStyleCritical]; - - [alert beginSheetModalForWindow:targetWindow completionHandler:^(NSModalResponse returnCode) { - if (returnCode == NSAlertSecondButtonReturn) - { - NSInteger index = [self.queue.items indexOfObject:self.queue.currentItem]; - [self.queue cancelCurrentItemAndContinue]; - [self.queue removeItemsAtIndexes:[NSIndexSet indexSetWithIndex:index]]; - } - }]; - } + // Which window to attach the sheet to? + NSWindow *targetWindow = self.window; + + NSAlert *alert = [[NSAlert alloc] init]; + [alert setMessageText:alertTitle]; + [alert setInformativeText:NSLocalizedString(@"Your movie will be lost if you don't continue encoding.", @"Queue Stop Alert -> stop and remove informative text")]; + [alert addButtonWithTitle:NSLocalizedString(@"Keep Encoding", @"Queue Stop Alert -> stop and remove first button")]; + [alert addButtonWithTitle:NSLocalizedString(@"Stop Encoding and Delete", @"Queue Stop Alert -> stop and remove second button")]; + [alert setAlertStyle:NSAlertStyleCritical]; + + [alert beginSheetModalForWindow:targetWindow completionHandler:^(NSModalResponse returnCode) { + if (returnCode == NSAlertSecondButtonReturn) + { + [self.queue cancelItemsAtIndexes:workingSelectedIndexes]; + [self.queue removeItemsAtIndexes:workingSelectedIndexes]; + } + }]; } // remove the non working items immediately @@ -360,9 +325,10 @@ { NSParameterAssert(item); - if (item == self.queue.currentItem) + if (item.state == HBQueueItemStateWorking) { - [self.queue cancelCurrentItemAndContinue]; + NSUInteger index = [self.queue.items indexOfObject:item]; + [self.queue cancelItemsAtIndexes:[NSIndexSet indexSetWithIndex:index]]; } else { @@ -393,7 +359,7 @@ // if this is a currently encoding item, 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 (item == self.queue.currentItem) + if (item.state == HBQueueItemStateWorking) { NSString *alertTitle = [NSString stringWithFormat:NSLocalizedString(@"Stop This Encode and Edit It?", @"Queue Edit Alert -> stop and edit message")]; @@ -687,7 +653,7 @@ NSString * const HBQueueItemNotificationPathKey = @"HBQueueItemNotificationPathK [alert beginSheetModalForWindow:window completionHandler:^(NSModalResponse returnCode) { if (returnCode == NSAlertSecondButtonReturn) { - [self.queue cancelCurrentItemAndContinue]; + [self.queue cancelCurrentAndContinue]; } else if (returnCode == NSAlertThirdButtonReturn) { @@ -695,7 +661,7 @@ NSString * const HBQueueItemNotificationPathKey = @"HBQueueItemNotificationPathK } else if (returnCode == NSAlertThirdButtonReturn + 1) { - [self.queue cancelCurrentItemAndStop]; + [self.queue cancelCurrentAndStop]; } }]; } diff --git a/macosx/HBQueueDockTileController.h b/macosx/HBQueueDockTileController.h new file mode 100644 index 000000000..028a99231 --- /dev/null +++ b/macosx/HBQueueDockTileController.h @@ -0,0 +1,22 @@ +// +// HBQueueDockTileController.h +// HandBrake +// +// Created by Damiano Galassi on 09/04/2020. +// Copyright © 2020 HandBrake. All rights reserved. +// + +#import <Cocoa/Cocoa.h> + +@class HBQueue; + +NS_ASSUME_NONNULL_BEGIN + +@interface HBQueueDockTileController : NSObject + +- (instancetype)init NS_UNAVAILABLE; +- (instancetype)initWithQueue:(HBQueue *)queue dockTile:(NSDockTile *)dockTile image:(NSImage *)image NS_DESIGNATED_INITIALIZER; + +@end + +NS_ASSUME_NONNULL_END diff --git a/macosx/HBQueueDockTileController.m b/macosx/HBQueueDockTileController.m new file mode 100644 index 000000000..2845411c0 --- /dev/null +++ b/macosx/HBQueueDockTileController.m @@ -0,0 +1,116 @@ +// +// HBQueueDockTileController.m +// HandBrake +// +// Created by Damiano Galassi on 09/04/2020. +// Copyright © 2020 HandBrake. All rights reserved. +// + +#import "HBQueueDockTileController.h" + +#import "HBDockTile.h" +#import "HBQueue.h" + +#define dockTileUpdateFrequency 0.1f + +@interface HBQueueDockTileController () + +@property (nonatomic, readonly) HBQueue *queue; +@property (nonatomic, readonly) HBDockTile *dockTile; +@property (nonatomic) double progress; + +@property (nonatomic) id observerToken; + +@end + +@implementation HBQueueDockTileController + +- (instancetype)initWithQueue:(HBQueue *)queue dockTile:(id)dockTile image:(NSImage *)image +{ + self = [super init]; + if (self) + { + _queue = queue; + _dockTile = [[HBDockTile alloc] initWithDockTile:dockTile image:image]; + + [NSNotificationCenter.defaultCenter addObserverForName:HBQueueDidStartItemNotification + object:_queue queue:NSOperationQueue.mainQueue + usingBlock:^(NSNotification * _Nonnull note) { [self setUpObservers]; }]; + + [NSNotificationCenter.defaultCenter addObserverForName:HBQueueDidCompleteItemNotification + object:_queue queue:NSOperationQueue.mainQueue + usingBlock:^(NSNotification * _Nonnull note) { [self setUpObservers]; }]; + + [NSNotificationCenter.defaultCenter addObserverForName:HBQueueDidChangeStateNotification + object:_queue queue:NSOperationQueue.mainQueue + usingBlock:^(NSNotification * _Nonnull note) { [self setUpObservers]; }]; + } + return self; +} + +- (void)setUpObservers +{ + [self removeObservers]; + + if (self->_queue.workingItemsCount > 1) + { + [self setUpForMultipleWorkers]; + } + else + { + [self setUpForSingleWorker]; + } +} + +- (void)setUpForMultipleWorkers +{ + self.dockTile.stringValue = [NSString stringWithFormat:@"%lu of %lu", self.queue.workingItemsCount, self.queue.pendingItemsCount]; + self.progress = 0; +} + +- (void)setUpForSingleWorker +{ + self.progress = 0; + HBQueueItem *firstWorkingItem = nil; + for (HBQueueItem *item in self.queue.items) + { + if (item.state == HBQueueItemStateWorking) + { + firstWorkingItem = item; + break; + } + } + + if (firstWorkingItem) + { + HBQueueWorker *worker = [self.queue workerForItem:firstWorkingItem]; + + if (worker) + { + + self.observerToken = [NSNotificationCenter.defaultCenter addObserverForName:HBQueueWorkerProgressNotification + object:worker queue:NSOperationQueue.mainQueue + usingBlock:^(NSNotification * _Nonnull note) { + double progress = [note.userInfo[HBQueueWorkerProgressNotificationPercentKey] doubleValue]; + + if (self.progress < 100.0 * progress) + { + double hours = [note.userInfo[HBQueueWorkerProgressNotificationHoursKey] doubleValue]; + double minutes = [note.userInfo[HBQueueWorkerProgressNotificationMinutesKey] doubleValue]; + double seconds = [note.userInfo[HBQueueWorkerProgressNotificationSecondsKey] doubleValue]; + + [self.dockTile setProgress:progress hours:hours minutes:minutes seconds:seconds]; + self.progress += dockTileUpdateFrequency; + } + }]; + } + } +} + +- (void)removeObservers +{ + [NSNotificationCenter.defaultCenter removeObserver:self.observerToken]; + self.observerToken = nil; +} + +@end diff --git a/macosx/HBQueueInfoViewController.m b/macosx/HBQueueInfoViewController.m index e2e0872c6..27b88b81b 100644 --- a/macosx/HBQueueInfoViewController.m +++ b/macosx/HBQueueInfoViewController.m @@ -5,7 +5,8 @@ It may be used under the terms of the GNU General Public License. */ #import "HBQueueInfoViewController.h" -#import "HBQueue.h" + +static void *HBQueueInfoViewControllerContext = &HBQueueInfoViewControllerContext; @interface HBQueueInfoViewController () @@ -33,51 +34,26 @@ return self; } -- (void)viewDidLoad { +- (void)viewDidLoad +{ [super viewDidLoad]; [self updateLabels]; - [self setUpObservers]; + [self addObserver:self forKeyPath:@"item.state" options:0 context:HBQueueInfoViewControllerContext]; } -- (void)setUpObservers +- (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context { - // It would be easier to just KVO the item state property, - // But we can't because the item is a NSProxy. - NSNotificationCenter * __weak center = NSNotificationCenter.defaultCenter; - - [center addObserverForName:HBQueueDidStartItemNotification - object:nil - queue:NSOperationQueue.mainQueue usingBlock:^(NSNotification * _Nonnull note) - { - HBQueueItem *startedItem = note.userInfo[HBQueueItemNotificationItemKey]; - - if (startedItem == self.item) - { - [self updateUI]; - } - }]; - - [center addObserverForName:HBQueueDidCompleteItemNotification - object:nil - queue:NSOperationQueue.mainQueue usingBlock:^(NSNotification * _Nonnull note) - { - HBQueueItem *completedItem = note.userInfo[HBQueueItemNotificationItemKey]; - - if (completedItem == self.item) - { - [self updateUI]; - } - }]; - - [center addObserverForName:HBQueueDidChangeItemNotification - object:nil - queue:NSOperationQueue.mainQueue usingBlock:^(NSNotification * _Nonnull note) - { - [self updateUI]; - }]; - + if (context == HBQueueInfoViewControllerContext) + { + [self updateUI]; + } + else + { + [super observeValueForKeyPath:keyPath ofObject:object change:change context:context]; + } } + - (void)updateUI { [self updateLabels]; @@ -129,7 +105,6 @@ - (void)setItem:(HBQueueItem *)item { _item = item; - [self updateUI]; } - (IBAction)editItem:(id)sender diff --git a/macosx/HBQueueItemWorkingView.h b/macosx/HBQueueItemWorkingView.h index 4223829b6..fb9742d44 100644 --- a/macosx/HBQueueItemWorkingView.h +++ b/macosx/HBQueueItemWorkingView.h @@ -6,10 +6,14 @@ #import "HBQueueItemView.h" +@class HBQueueWorker; + NS_ASSUME_NONNULL_BEGIN @interface HBQueueItemWorkingView : HBQueueItemView +@property (nonatomic) HBQueueWorker *worker; + @end NS_ASSUME_NONNULL_END diff --git a/macosx/HBQueueItemWorkingView.m b/macosx/HBQueueItemWorkingView.m index 84118af94..07c5bea66 100644 --- a/macosx/HBQueueItemWorkingView.m +++ b/macosx/HBQueueItemWorkingView.m @@ -7,7 +7,7 @@ #import "HBQueueItemWorkingView.h" #import "HBQueueItem.h" -#import "HBQueue.h" +#import "HBQueueWorker.h" #import "HBAttributedStringAdditions.h" @@ -23,29 +23,26 @@ @implementation HBQueueItemWorkingView -- (void)setUpObservers +- (void)setUpObserversWithWorker:(HBQueueWorker *)worker { NSNotificationCenter * __weak center = NSNotificationCenter.defaultCenter; - self.progressToken = [center addObserverForName:HBQueueProgressNotification - object:nil + self.progressToken = [center addObserverForName:HBQueueWorkerProgressNotification + object:worker queue:NSOperationQueue.mainQueue usingBlock:^(NSNotification * _Nonnull note) { - NSString *progressInfo = note.userInfo[HBQueueProgressNotificationInfoKey]; - double progress = [note.userInfo[HBQueueProgressNotificationPercentKey] doubleValue]; + NSString *progressInfo = note.userInfo[HBQueueWorkerProgressNotificationInfoKey]; + double progress = [note.userInfo[HBQueueWorkerProgressNotificationPercentKey] doubleValue]; self.progressField.stringValue = progressInfo; self.progressBar.doubleValue = progress; }]; - self.completedToken = [center addObserverForName:HBQueueDidCompleteItemNotification - object:nil + self.completedToken = [center addObserverForName:HBQueueWorkerDidCompleteItemNotification + object:worker queue:NSOperationQueue.mainQueue usingBlock:^(NSNotification * _Nonnull note) { - HBQueueItem *completedItem = note.userInfo[HBQueueItemNotificationItemKey]; - if (completedItem == self.item) { - [self removeObservers]; - } + [self removeObservers]; }]; self.progressField.font = [NSFont monospacedDigitSystemFontOfSize:NSFont.smallSystemFontSize weight:NSFontWeightRegular]; @@ -70,18 +67,16 @@ [self removeObservers]; } +- (void)setWorker:(HBQueueWorker *)worker +{ + [self setUpObserversWithWorker:worker]; +} + - (void)setItem:(HBQueueItem *)item { [self removeObservers]; - self.progressField.stringValue = @""; - [super setItem:item]; - - if (item.state == HBQueueItemStateWorking) - { - [self setUpObservers]; - } } @end diff --git a/macosx/HBQueueTableViewController.m b/macosx/HBQueueTableViewController.m index e42a78aa3..78aaca7a6 100644 --- a/macosx/HBQueueTableViewController.m +++ b/macosx/HBQueueTableViewController.m @@ -6,8 +6,10 @@ #import "HBQueueTableViewController.h" +#import "HBQueue.h" #import "HBTableView.h" #import "HBQueueItemView.h" +#import "HBQueueItemWorkingView.h" // Pasteboard type for or drag operations #define HBQueueDragDropPboardType @"HBQueueCustomTableViewPboardType" @@ -49,12 +51,6 @@ [self.tableView setDraggingSourceOperationMask:NSDragOperationEvery forLocal:YES]; [self.tableView setVerticalMotionCanBeginDrag:YES]; - // Reloads the queue, this is called - // when another HandBrake instances modifies the queue - [NSNotificationCenter.defaultCenter addObserverForName:HBQueueReloadItemsNotification object:_queue queue:NSOperationQueue.mainQueue usingBlock:^(NSNotification * _Nonnull note) { - [self.tableView reloadData]; - }]; - [NSNotificationCenter.defaultCenter addObserverForName:HBQueueDidAddItemNotification object:_queue queue:NSOperationQueue.mainQueue usingBlock:^(NSNotification * _Nonnull note) { NSIndexSet *indexes = note.userInfo[HBQueueItemNotificationIndexesKey]; [self.tableView insertRowsAtIndexes:indexes withAnimation:NSTableViewAnimationSlideDown]; @@ -86,10 +82,12 @@ typedef void (^HBUpdateHeight)(NSNotification *note); HBUpdateHeight updateHeight = ^void(NSNotification *note) { - NSIndexSet *indexes = note.userInfo[HBQueueItemNotificationIndexesKey]; - NSIndexSet *columnIndexes = [NSIndexSet indexSetWithIndex:0]; - if (indexes.count) + HBQueueItem *item = note.userInfo[HBQueueItemNotificationItemKey]; + NSUInteger index = [self.queue.items indexOfObject:item]; + if (index != NSNotFound) { + NSIndexSet *indexes = [NSIndexSet indexSetWithIndex:index]; + NSIndexSet *columnIndexes = [NSIndexSet indexSetWithIndex:0]; [self.tableView reloadDataForRowIndexes:indexes columnIndexes:columnIndexes]; [self.tableView noteHeightOfRowsWithIndexesChanged:indexes]; } @@ -247,16 +245,27 @@ - (NSView *)tableView:(NSTableView *)tableView viewForTableColumn:(NSTableColumn *)tableColumn - row:(NSInteger)row { + row:(NSInteger)row +{ HBQueueItem *item = self.queue.items[row]; + HBQueueItemView *view = nil; - HBQueueItemView *view = item.state == HBQueueItemStateWorking && item == self.queue.currentItem ? - [tableView makeViewWithIdentifier:@"MainWorkingCell" owner:self] : - [tableView makeViewWithIdentifier:@"MainCell" owner:self]; + if (item.state == HBQueueItemStateWorking) + { + HBQueueItemWorkingView *workingView = [tableView makeViewWithIdentifier:@"MainWorkingCell" owner:self]; + HBQueueWorker *worker = [self.queue workerForItem:item]; + workingView.item = item; + workingView.worker = worker; + view = workingView; + } + else + { + view = [tableView makeViewWithIdentifier:@"MainCell" owner:self]; + view.item = item; + } view.delegate = self; - view.item = item; return view; } @@ -269,7 +278,7 @@ - (CGFloat)tableView:(NSTableView *)tableView heightOfRow:(NSInteger)row { HBQueueItem *item = self.queue.items[row]; - return item.state == HBQueueItemStateWorking && item == self.queue.currentItem ? 58 : 22; + return item.state == HBQueueItemStateWorking ? 58 : 22; } #pragma mark NSQueueItemView delegate @@ -327,15 +336,6 @@ return NSDragOperationNone; } - // We do not let the user drop a pending item before or *above* - // already finished or currently encoding items. - NSInteger encodingRow = self.queue.currentItem ? [self.queue.items indexOfObject:self.queue.currentItem] : NSNotFound; - if (encodingRow != NSNotFound && row <= encodingRow) - { - return NSDragOperationNone; - row = MAX(row, encodingRow); - } - return NSDragOperationMove; } diff --git a/macosx/HBQueueWorker.h b/macosx/HBQueueWorker.h new file mode 100644 index 000000000..340016fb8 --- /dev/null +++ b/macosx/HBQueueWorker.h @@ -0,0 +1,47 @@ +/* HBQueueWorker.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 <Foundation/Foundation.h> + +#import "HBQueueItem.h" + +NS_ASSUME_NONNULL_BEGIN + +extern NSString * const HBQueueWorkerDidChangeStateNotification; + +extern NSString * const HBQueueWorkerProgressNotification; +extern NSString * const HBQueueWorkerProgressNotificationPercentKey; // NSNumber - double +extern NSString * const HBQueueWorkerProgressNotificationHoursKey; // NSNumber - double +extern NSString * const HBQueueWorkerProgressNotificationMinutesKey; // NSNumber - double +extern NSString * const HBQueueWorkerProgressNotificationSecondsKey; // NSNumber - double +extern NSString * const HBQueueWorkerProgressNotificationInfoKey; // NSString + +extern NSString * const HBQueueWorkerDidStartItemNotification; +extern NSString * const HBQueueWorkerDidCompleteItemNotification; +extern NSString * const HBQueueWorkerItemNotificationItemKey; // HBQueueItem + +@interface HBQueueWorker : NSObject + +- (instancetype)init NS_UNAVAILABLE; +- (instancetype)initWithXPCServiceName:(NSString *)serviceName; + +@property (nonatomic, nullable, readonly) HBQueueItem *item; + +- (void)encodeItem:(HBQueueItem *)item; +- (void)cancel; + +@property (nonatomic, readonly) BOOL canEncode; +@property (nonatomic, readonly) BOOL isEncoding; + +@property (nonatomic, readonly) BOOL canPause; +- (void)pause; + +@property (nonatomic, readonly) BOOL canResume; +- (void)resume; + +@end + +NS_ASSUME_NONNULL_END diff --git a/macosx/HBQueueWorker.m b/macosx/HBQueueWorker.m new file mode 100644 index 000000000..4031bc4b0 --- /dev/null +++ b/macosx/HBQueueWorker.m @@ -0,0 +1,273 @@ +/* HBQueueWorker.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 "HBQueueWorker.h" + +#import "HBRemoteCore.h" +#import "HBJobOutputFileWriter.h" +#import "HBPreferencesKeys.h" + +static void *HBQueueWorkerContext = &HBQueueWorkerContext; +static void *HBQueueWorkerLogLevelContext = &HBQueueWorkerLogLevelContext; + +NSString * const HBQueueWorkerDidChangeStateNotification = @"HBQueueWorkerDidChangeStateNotification"; + +NSString * const HBQueueWorkerProgressNotification = @"HBQueueWorkerProgressNotification"; +NSString * const HBQueueWorkerProgressNotificationPercentKey = @"HBQueueWorkerProgressNotificationPercentKey"; +NSString * const HBQueueWorkerProgressNotificationHoursKey = @"HBQueueWorkerProgressNotificationHoursKey"; +NSString * const HBQueueWorkerProgressNotificationMinutesKey = @"HBQueueWorkerProgressNotificationMinutesKey"; +NSString * const HBQueueWorkerProgressNotificationSecondsKey = @"HBQueueWorkerProgressNotificationSecondsKey"; +NSString * const HBQueueWorkerProgressNotificationInfoKey = @"HBQueueWorkerProgressNotificationInfoKey"; + +NSString * const HBQueueWorkerDidStartItemNotification = @"HBQueueWorkerDidStartItemNotification"; +NSString * const HBQueueWorkerDidCompleteItemNotification = @"HBQueueWorkerDidCompleteItemNotification"; +NSString * const HBQueueWorkerItemNotificationItemKey = @"HBQueueWorkerItemNotificationItemKey"; + +@interface HBQueueWorker () + +@property (nonatomic, readonly) HBRemoteCore *core; + +@property (nonatomic, nullable) HBQueueItem *item; +@property (nonatomic, nullable) HBJobOutputFileWriter *currentLog; + +@end + +@implementation HBQueueWorker + +- (instancetype)initWithXPCServiceName:(NSString *)serviceName +{ + self = [super init]; + if (self) + { + NSInteger loggingLevel = [NSUserDefaults.standardUserDefaults integerForKey:HBLoggingLevel]; + _core = [[HBRemoteCore alloc] initWithLogLevel:loggingLevel name:serviceName serviceName:serviceName]; + _core.automaticallyPreventSleep = NO; + + // Set up observers + [self.core addObserver:self forKeyPath:@"state" + options:NSKeyValueObservingOptionNew | NSKeyValueObservingOptionInitial + context:HBQueueWorkerContext]; + + [NSUserDefaultsController.sharedUserDefaultsController addObserver:self forKeyPath:@"values.LoggingLevel" + options:0 context:HBQueueWorkerLogLevelContext]; + } + return self; +} + +- (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context +{ + if (context == HBQueueWorkerContext) + { + [NSNotificationCenter.defaultCenter postNotificationName:HBQueueWorkerDidChangeStateNotification object:self]; + } + else if (context == HBQueueWorkerLogLevelContext) + { + self.core.logLevel = [NSUserDefaults.standardUserDefaults integerForKey:HBLoggingLevel]; + } + else + { + [super observeValueForKeyPath:keyPath ofObject:object change:change context:context]; + } +} + +- (void)dealloc +{ + [self.core removeObserver:self forKeyPath:@"state" context:HBQueueWorkerContext]; + [NSUserDefaultsController.sharedUserDefaultsController removeObserver:self forKeyPath:@"values.LoggingLevel" context:HBQueueWorkerLogLevelContext]; + [self.core invalidate]; +} + +- (BOOL)canEncode +{ + return self.item == nil; +} + +- (BOOL)isEncoding +{ + return self.item != nil; +} + +- (BOOL)canPause +{ + HBState s = self.core.state; + return (s == HBStateWorking || s == HBStateMuxing); +} + +- (void)pause +{ + [self.item pausedAtDate:[NSDate date]]; + [self.core pause]; + [self.core allowSleep]; +} + +- (BOOL)canResume +{ + return self.core.state == HBStatePaused; +} + +- (void)resume +{ + [self.item resumedAtDate:[NSDate date]]; + [self.core resume]; + [self.core preventSleep]; +} + +- (void)completedItem:(HBQueueItem *)item result:(HBCoreResult)result +{ + NSParameterAssert(item); + + item.endedDate = [NSDate date]; + + // Since we are done with this encode, tell output to stop writing to the + // individual encode log. + [self.core.stderrRedirect removeListener:self.currentLog]; + [self.core.stdoutRedirect removeListener:self.currentLog]; + + self.currentLog = nil; + + // Mark the encode just finished + switch (result) { + case HBCoreResultDone: + item.state = HBQueueItemStateCompleted; + break; + case HBCoreResultCanceled: + item.state = HBQueueItemStateCanceled; + break; + default: + item.state = HBQueueItemStateFailed; + break; + } + + self.item = nil; + + [NSNotificationCenter.defaultCenter postNotificationName:HBQueueWorkerProgressNotification + object:self + userInfo:@{HBQueueWorkerProgressNotificationPercentKey: @1.0, + HBQueueWorkerProgressNotificationInfoKey: @""}]; + + [NSNotificationCenter.defaultCenter postNotificationName:HBQueueWorkerDidCompleteItemNotification + object:self + userInfo:@{HBQueueWorkerItemNotificationItemKey: item}]; +} + +/** + * Here we actually tell hb_scan to perform the source scan, using the path to source and title number + */ +- (void)encodeItem:(HBQueueItem *)item +{ + NSParameterAssert(item); + + // now we mark the queue item as working so another instance can not come along and try to scan it while we are scanning + item.startedDate = [NSDate date]; + item.state = HBQueueItemStateWorking; + + self.item = item; + + [NSNotificationCenter.defaultCenter postNotificationName:HBQueueWorkerDidStartItemNotification + object:self + userInfo:@{HBQueueWorkerItemNotificationItemKey: item}]; + + // Tell HB to output a new activity log file for this encode + self.currentLog = [[HBJobOutputFileWriter alloc] initWithJob:item.job]; + if (self.currentLog) + { + item.activityLogURL = self.currentLog.url; + + dispatch_queue_t mainQueue = dispatch_get_main_queue(); + [self.core.stderrRedirect addListener:self.currentLog queue:mainQueue]; + [self.core.stdoutRedirect addListener:self.currentLog queue:mainQueue]; + } + + // Progress handler + void (^progressHandler)(HBState state, HBProgress progress, NSString *info) = ^(HBState state, HBProgress progress, NSString *info) + { + [NSNotificationCenter.defaultCenter postNotificationName:HBQueueWorkerProgressNotification + object:self + userInfo:@{HBQueueWorkerProgressNotificationPercentKey: @0, + HBQueueWorkerProgressNotificationInfoKey: info}]; + }; + + // Completion handler + void (^completionHandler)(HBCoreResult result) = ^(HBCoreResult result) + { + if (result == HBCoreResultDone) + { + [self realEncodeItem:item]; + } + else + { + [self completedItem:item result:result]; + } + }; + + [item.job refreshSecurityScopedResources]; + + // Only scan 10 previews before an encode - additional previews are + // only useful for autocrop and static previews, which are already taken care of at this point + [self.core scanURL:item.fileURL + titleIndex:item.job.titleIdx + previews:10 + minDuration:0 + keepPreviews:NO + progressHandler:progressHandler + completionHandler:completionHandler]; +} + +/** + * This assumes that we have re-scanned and loaded up a new queue item to send to libhb + */ +- (void)realEncodeItem:(HBQueueItem *)item +{ + HBJob *job = item.job; + + // Progress handler + void (^progressHandler)(HBState state, HBProgress progress, NSString *info) = ^(HBState state, HBProgress progress, NSString *info) + { + if (state == HBStateMuxing) + { + [NSNotificationCenter.defaultCenter postNotificationName:HBQueueWorkerProgressNotification + object:self + userInfo:@{HBQueueWorkerProgressNotificationPercentKey: @1, + HBQueueWorkerProgressNotificationInfoKey: info}]; + } + else + { + [NSNotificationCenter.defaultCenter postNotificationName:HBQueueWorkerProgressNotification + object:self + userInfo:@{HBQueueWorkerProgressNotificationPercentKey: @(progress.percent), + HBQueueWorkerProgressNotificationHoursKey: @(progress.hours), + HBQueueWorkerProgressNotificationMinutesKey: @(progress.minutes), + HBQueueWorkerProgressNotificationSecondsKey: @(progress.seconds), + HBQueueWorkerProgressNotificationInfoKey: info}]; + } + }; + + // Completion handler + void (^completionHandler)(HBCoreResult result) = ^(HBCoreResult result) + { + [self completedItem:item result:result]; + }; + + // We should be all setup so let 'er rip + [self.core encodeJob:job progressHandler:progressHandler completionHandler:completionHandler]; +} + +/** + * Cancels the current job + */ +- (void)cancel +{ + if (self.core.state == HBStateScanning) + { + [self.core cancelScan]; + } + else + { + [self.core cancelEncode]; + } +} + +@end diff --git a/macosx/HBRemoteCore.h b/macosx/HBRemoteCore.h index add53710e..723f4c211 100644 --- a/macosx/HBRemoteCore.h +++ b/macosx/HBRemoteCore.h @@ -11,7 +11,7 @@ NS_ASSUME_NONNULL_BEGIN @interface HBRemoteCore : NSObject -- (instancetype)initWithLogLevel:(NSInteger)level name:(NSString *)name; +- (instancetype)initWithLogLevel:(NSInteger)level name:(NSString *)name serviceName:(NSString *)serviceName; - (void)invalidate; @property (nonatomic, readwrite) NSInteger logLevel; diff --git a/macosx/HBRemoteCore.m b/macosx/HBRemoteCore.m index 39b400f0c..25902f6db 100644 --- a/macosx/HBRemoteCore.m +++ b/macosx/HBRemoteCore.m @@ -5,7 +5,6 @@ #import "HBRemoteCore.h" #import "HBRemoteCoreProtocol.h" #import "HBPreferencesKeys.h" -#import <IOKit/pwr_mgt/IOPMLib.h> @import HandBrakeKit; @@ -18,12 +17,11 @@ @property (nonatomic, readonly) NSInteger level; @property (nonatomic, readonly, copy) NSString *name; +@property (nonatomic, readonly, copy) NSString *serviceName; @property (nonatomic, readwrite, copy) HBCoreProgressHandler progressHandler; @property (nonatomic, readwrite, copy) HBCoreCompletionHandler completionHandler; -@property (nonatomic, readwrite) IOPMAssertionID assertionID; - @end @implementation HBRemoteCore @@ -36,27 +34,28 @@ _state = HBStateIdle; _stdoutRedirect = HBRedirect.stdoutRedirect; _stderrRedirect = HBRedirect.stderrRedirect; - _assertionID = -1; _level = 1; _name = @"HandBrakeXPC"; + _serviceName = @"fr.handbrake.HandBrakeXPCService"; } return self; } -- (instancetype)initWithLogLevel:(NSInteger)level name:(NSString *)name +- (instancetype)initWithLogLevel:(NSInteger)level name:(NSString *)name serviceName:(NSString *)serviceName { self = [self init]; if (self) { _level = level; - _name = name; + _name = [name copy]; + _serviceName = [serviceName copy]; } return self; } - (void)connect { - _connection = [[NSXPCConnection alloc] initWithServiceName:@"fr.handbrake.HandBrakeXPCService"]; + _connection = [[NSXPCConnection alloc] initWithServiceName:self.serviceName]; _connection.remoteObjectInterface = [NSXPCInterface interfaceWithProtocol:@protocol(HBRemoteCoreProtocol)]; _connection.exportedInterface = [NSXPCInterface interfaceWithProtocol:@protocol(HBRemoteProgressProtocol)]; @@ -129,55 +128,19 @@ [_proxy setLogLevel:logLevel]; } -- (void)preventSleep +- (void)setAutomaticallyPreventSleep:(BOOL)automaticallyPreventSleep { - if (_assertionID != -1) - { - // nothing to do - return; - } - - CFStringRef reasonForActivity= CFSTR("HandBrake is currently scanning and/or encoding"); - - IOReturn success = IOPMAssertionCreateWithName(kIOPMAssertPreventUserIdleSystemSleep, - kIOPMAssertionLevelOn, reasonForActivity, &_assertionID); - - if (success != kIOReturnSuccess) - { - [HBUtilities writeToActivityLog:"HBRemoteCore: failed to prevent system sleep"]; - } + [_proxy setAutomaticallyPreventSleep:automaticallyPreventSleep]; } - (void)allowSleep { - if (_assertionID == -1) - { - // nothing to do - return; - } - - IOReturn success = IOPMAssertionRelease(_assertionID); - - if (success == kIOReturnSuccess) - { - _assertionID = -1; - } -} - -- (void)preventAutoSleep -{ - if (self.automaticallyPreventSleep) - { - [self preventSleep]; - } + [_proxy allowSleep]; } -- (void)allowAutoSleep +- (void)preventSleep { - if (self.automaticallyPreventSleep) - { - [self allowSleep]; - } + [_proxy preventSleep]; } - (void)scanURL:(NSURL *)url titleIndex:(NSUInteger)index previews:(NSUInteger)previewsNum minDuration:(NSUInteger)seconds keepPreviews:(BOOL)keepPreviews progressHandler:(nonnull HBCoreProgressHandler)progressHandler completionHandler:(nonnull HBCoreCompletionHandler)completionHandler @@ -187,8 +150,6 @@ [self connect]; } - [self preventAutoSleep]; - #ifdef __SANDBOX_ENABLED__ __block HBSecurityAccessToken *token = [HBSecurityAccessToken tokenWithObject:url]; @@ -214,7 +175,6 @@ #ifdef __SANDBOX_ENABLED__ token = nil; #endif - [weakSelf allowAutoSleep]; handler(result); }); }]; @@ -227,8 +187,6 @@ - (void)encodeJob:(HBJob *)job progressHandler:(HBCoreProgressHandler)progressHandler completionHandler:(HBCoreCompletionHandler)completionHandler { - [self preventAutoSleep]; - #ifdef __SANDBOX_ENABLED__ __block HBSecurityAccessToken *token = [HBSecurityAccessToken tokenWithObject:job]; @@ -271,7 +229,6 @@ #ifdef __SANDBOX_ENABLED__ token = nil; #endif - [weakSelf allowAutoSleep]; handler(result); }); }]; @@ -308,13 +265,11 @@ - (void)pause { [_proxy pauseEncode]; - [self allowAutoSleep]; } - (void)resume { [_proxy resumeEncode]; - [self preventAutoSleep]; } @end diff --git a/macosx/HandBrake.xcodeproj/project.pbxproj b/macosx/HandBrake.xcodeproj/project.pbxproj index 2e2db6ab6..613fce0f1 100644 --- a/macosx/HandBrake.xcodeproj/project.pbxproj +++ b/macosx/HandBrake.xcodeproj/project.pbxproj @@ -81,6 +81,7 @@ A91119A41C7DD614001C463C /* HBSubtitlesDefaults.h in Headers */ = {isa = PBXBuildFile; fileRef = A9F4728B1976BAA70009EC65 /* HBSubtitlesDefaults.h */; settings = {ATTRIBUTES = (Public, ); }; }; A91485FE1F61296100374C12 /* HBFiltersViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = A91485FD1F61296100374C12 /* HBFiltersViewController.m */; }; A914BCB31BC441C700157917 /* HBPreviewView.m in Sources */ = {isa = PBXBuildFile; fileRef = A914BCB21BC441C700157917 /* HBPreviewView.m */; }; + A9150DAE243F7BE200694870 /* HBQueueDockTileController.m in Sources */ = {isa = PBXBuildFile; fileRef = A9150DAD243F7BE200694870 /* HBQueueDockTileController.m */; }; A916180E1C845161000556C6 /* NSDictionary+HBAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = A93B0DF71C804CF50051A3FA /* NSDictionary+HBAdditions.m */; }; A916C9921C84498F00C7B560 /* HBDockTextField.m in Sources */ = {isa = PBXBuildFile; fileRef = 46AB433415F98A2B009C0961 /* HBDockTextField.m */; }; A916C9931C8449A100C7B560 /* HBAddPresetController.m in Sources */ = {isa = PBXBuildFile; fileRef = A9E2FD251A21BC4A000E8D3F /* HBAddPresetController.m */; }; @@ -185,6 +186,27 @@ A92268781A6E555500A8D5C5 /* HBAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = A92268771A6E555500A8D5C5 /* HBAppDelegate.m */; }; A9294CC91DC4BBF7004D3415 /* HBJob+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = A9294CC71DC4BBF7004D3415 /* HBJob+Private.h */; settings = {ATTRIBUTES = (Private, ); }; }; A92B148220CA9F7700146FD8 /* HBHUDView.m in Sources */ = {isa = PBXBuildFile; fileRef = A92B148120CA9F7600146FD8 /* HBHUDView.m */; }; + A93341B7243E1583003A82C2 /* HBOutputRedirect.m in Sources */ = {isa = PBXBuildFile; fileRef = 273F209E14ADBE670021BE6D /* HBOutputRedirect.m */; }; + A93341B8243E1583003A82C2 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = A964D39B22FDE8EE00DFCAEA /* main.m */; }; + A93341B9243E1583003A82C2 /* HandBrakeXPCService.m in Sources */ = {isa = PBXBuildFile; fileRef = A964D39922FDE8EE00DFCAEA /* HandBrakeXPCService.m */; }; + A93341BA243E1583003A82C2 /* HBRedirect.m in Sources */ = {isa = PBXBuildFile; fileRef = A954010222FF397000F83A5F /* HBRedirect.m */; }; + A93341BC243E1583003A82C2 /* HandBrakeKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A9736F021C7DA5FE008F1D18 /* HandBrakeKit.framework */; }; + A93341C8243E158B003A82C2 /* HBOutputRedirect.m in Sources */ = {isa = PBXBuildFile; fileRef = 273F209E14ADBE670021BE6D /* HBOutputRedirect.m */; }; + A93341C9243E158B003A82C2 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = A964D39B22FDE8EE00DFCAEA /* main.m */; }; + A93341CA243E158B003A82C2 /* HandBrakeXPCService.m in Sources */ = {isa = PBXBuildFile; fileRef = A964D39922FDE8EE00DFCAEA /* HandBrakeXPCService.m */; }; + A93341CB243E158B003A82C2 /* HBRedirect.m in Sources */ = {isa = PBXBuildFile; fileRef = A954010222FF397000F83A5F /* HBRedirect.m */; }; + A93341CD243E158B003A82C2 /* HandBrakeKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A9736F021C7DA5FE008F1D18 /* HandBrakeKit.framework */; }; + A93341CF243E158B003A82C2 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = A919992A23003CFC0037F526 /* Localizable.strings */; }; + A93341D9243E158E003A82C2 /* HBOutputRedirect.m in Sources */ = {isa = PBXBuildFile; fileRef = 273F209E14ADBE670021BE6D /* HBOutputRedirect.m */; }; + A93341DA243E158E003A82C2 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = A964D39B22FDE8EE00DFCAEA /* main.m */; }; + A93341DB243E158E003A82C2 /* HandBrakeXPCService.m in Sources */ = {isa = PBXBuildFile; fileRef = A964D39922FDE8EE00DFCAEA /* HandBrakeXPCService.m */; }; + A93341DC243E158E003A82C2 /* HBRedirect.m in Sources */ = {isa = PBXBuildFile; fileRef = A954010222FF397000F83A5F /* HBRedirect.m */; }; + A93341DE243E158E003A82C2 /* HandBrakeKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A9736F021C7DA5FE008F1D18 /* HandBrakeKit.framework */; }; + A93341E0243E158E003A82C2 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = A919992A23003CFC0037F526 /* Localizable.strings */; }; + A93341EE243E15BE003A82C2 /* HandBrakeXPCService2.xpc in CopyFiles */ = {isa = PBXBuildFile; fileRef = A93341C4243E1583003A82C2 /* HandBrakeXPCService2.xpc */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; }; + A93341EF243E15BE003A82C2 /* HandBrakeXPCService3.xpc in CopyFiles */ = {isa = PBXBuildFile; fileRef = A93341D5243E158B003A82C2 /* HandBrakeXPCService3.xpc */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; }; + A93341F0243E15BE003A82C2 /* HandBrakeXPCService4.xpc in CopyFiles */ = {isa = PBXBuildFile; fileRef = A93341E6243E158E003A82C2 /* HandBrakeXPCService4.xpc */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; }; + A93341F1243E15CE003A82C2 /* HandBrakeXPCService.xpc in CopyFiles */ = {isa = PBXBuildFile; fileRef = A964D39522FDE8EE00DFCAEA /* HandBrakeXPCService.xpc */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; }; A937EECB1C6C7C0300EEAE6D /* dsa_pub.pem in Resources */ = {isa = PBXBuildFile; fileRef = A937EECA1C6C7C0300EEAE6D /* dsa_pub.pem */; }; A939854F22315575001DCAEB /* Sparkle.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A939854D2231556D001DCAEB /* Sparkle.framework */; }; A939855022315592001DCAEB /* Sparkle.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = A939854D2231556D001DCAEB /* Sparkle.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; @@ -199,6 +221,7 @@ A94A98F51C858EFB004BA9BA /* HBDictTests.m in Sources */ = {isa = PBXBuildFile; fileRef = A94A98F41C858EFB004BA9BA /* HBDictTests.m */; }; A94DC2DE20CADA2C00EAC8FD /* MainWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = A94DC2DC20CADA2C00EAC8FD /* MainWindow.xib */; }; A95121E61B5F7BE700FD773D /* NSArray+HBAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = A95121E51B5F7BE700FD773D /* NSArray+HBAdditions.m */; }; + A951D9CA243E5B50002579F2 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = A919992A23003CFC0037F526 /* Localizable.strings */; }; A954010022FF240E00F83A5F /* HBOutputRedirect.m in Sources */ = {isa = PBXBuildFile; fileRef = 273F209E14ADBE670021BE6D /* HBOutputRedirect.m */; }; A954010322FF397000F83A5F /* HBRedirect.m in Sources */ = {isa = PBXBuildFile; fileRef = A954010222FF397000F83A5F /* HBRedirect.m */; }; A955128B1A320B02001BFC6F /* libjansson.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A95512881A320A12001BFC6F /* libjansson.a */; }; @@ -212,7 +235,6 @@ A96127E422E09ADD0086E6DC /* HBQueueTableViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = A96127E222E09ADD0086E6DC /* HBQueueTableViewController.m */; }; A964D39A22FDE8EE00DFCAEA /* HandBrakeXPCService.m in Sources */ = {isa = PBXBuildFile; fileRef = A964D39922FDE8EE00DFCAEA /* HandBrakeXPCService.m */; }; A964D39C22FDE8EE00DFCAEA /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = A964D39B22FDE8EE00DFCAEA /* main.m */; }; - A964D3A022FDE8EE00DFCAEA /* HandBrakeXPCService.xpc in CopyFiles */ = {isa = PBXBuildFile; fileRef = A964D39522FDE8EE00DFCAEA /* HandBrakeXPCService.xpc */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; }; A964D3A822FDE91B00DFCAEA /* HBRemoteCore.m in Sources */ = {isa = PBXBuildFile; fileRef = A964D3A722FDE91B00DFCAEA /* HBRemoteCore.m */; }; A96664B01CCE45BF00DA4A57 /* HBPlayerHUDController.m in Sources */ = {isa = PBXBuildFile; fileRef = A96664AE1CCE45BF00DA4A57 /* HBPlayerHUDController.m */; }; A96664B51CCE48F700DA4A57 /* HBPictureHUDController.m in Sources */ = {isa = PBXBuildFile; fileRef = A96664B31CCE48F700DA4A57 /* HBPictureHUDController.m */; }; @@ -241,6 +263,7 @@ A9A0CBE81CCEA3670045B3DF /* HBPlayerTrack.m in Sources */ = {isa = PBXBuildFile; fileRef = A9A0CBE61CCEA1D10045B3DF /* HBPlayerTrack.m */; }; A9A25D9C21182741005A8A0F /* CoreMedia.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A9A25D9B21182741005A8A0F /* CoreMedia.framework */; }; A9A25D9D21182753005A8A0F /* CoreMedia.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A9A25D9B21182741005A8A0F /* CoreMedia.framework */; }; + A9A5F7D5243DD90100C82EC8 /* HBQueueWorker.m in Sources */ = {isa = PBXBuildFile; fileRef = A9A5F7D4243DD90100C82EC8 /* HBQueueWorker.m */; }; A9A7E27C1FE2A0B5006BE79F /* HBPreviewViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = A9A7E27A1FE2A0B5006BE79F /* HBPreviewViewController.m */; }; A9A96B8220CAD2C200A39AFB /* HBPictureHUDController.xib in Resources */ = {isa = PBXBuildFile; fileRef = A9A96B8420CAD2C200A39AFB /* HBPictureHUDController.xib */; }; A9A96B8520CAD2CC00A39AFB /* HBEncodingProgressHUDController.xib in Resources */ = {isa = PBXBuildFile; fileRef = A9A96B8720CAD2CC00A39AFB /* HBEncodingProgressHUDController.xib */; }; @@ -318,6 +341,27 @@ remoteGlobalIDString = 273F203814ADBC200021BE6D; remoteInfo = HandBrake; }; + A93341E8243E15B2003A82C2 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 273F1FE014AD9DA40021BE6D /* Project object */; + proxyType = 1; + remoteGlobalIDString = A93341B5243E1583003A82C2; + remoteInfo = HandBrakeXPCService2; + }; + A93341EA243E15B4003A82C2 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 273F1FE014AD9DA40021BE6D /* Project object */; + proxyType = 1; + remoteGlobalIDString = A93341C6243E158B003A82C2; + remoteInfo = HandBrakeXPCService3; + }; + A93341EC243E15B6003A82C2 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 273F1FE014AD9DA40021BE6D /* Project object */; + proxyType = 1; + remoteGlobalIDString = A93341D7243E158E003A82C2; + remoteInfo = HandBrakeXPCService4; + }; A964D39E22FDE8EE00DFCAEA /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 273F1FE014AD9DA40021BE6D /* Project object */; @@ -382,9 +426,12 @@ dstPath = "$(CONTENTS_FOLDER_PATH)/XPCServices"; dstSubfolderSpec = 16; files = ( + A93341F1243E15CE003A82C2 /* HandBrakeXPCService.xpc in CopyFiles */, + A93341EE243E15BE003A82C2 /* HandBrakeXPCService2.xpc in CopyFiles */, + A93341EF243E15BE003A82C2 /* HandBrakeXPCService3.xpc in CopyFiles */, + A93341F0243E15BE003A82C2 /* HandBrakeXPCService4.xpc in CopyFiles */, A939855622315638001DCAEB /* org.sparkle-project.InstallerConnection.xpc in CopyFiles */, A939855722315638001DCAEB /* org.sparkle-project.InstallerLauncher.xpc in CopyFiles */, - A964D3A022FDE8EE00DFCAEA /* HandBrakeXPCService.xpc in CopyFiles */, A939855822315638001DCAEB /* org.sparkle-project.InstallerStatus.xpc in CopyFiles */, A939855A22315993001DCAEB /* org.sparkle-project.Downloader.xpc in CopyFiles */, ); @@ -504,6 +551,8 @@ A91485FD1F61296100374C12 /* HBFiltersViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = HBFiltersViewController.m; sourceTree = "<group>"; }; A914BCB11BC441C700157917 /* HBPreviewView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HBPreviewView.h; sourceTree = "<group>"; }; A914BCB21BC441C700157917 /* HBPreviewView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HBPreviewView.m; sourceTree = "<group>"; }; + A9150DAC243F7BE200694870 /* HBQueueDockTileController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = HBQueueDockTileController.h; sourceTree = "<group>"; }; + A9150DAD243F7BE200694870 /* HBQueueDockTileController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = HBQueueDockTileController.m; sourceTree = "<group>"; }; A9160A331AE7A165009A7818 /* HBCodingUtilities.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HBCodingUtilities.h; sourceTree = "<group>"; }; A91726E5197291BC00D1AFEF /* HBChapterTitlesController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HBChapterTitlesController.h; sourceTree = "<group>"; }; A91726E6197291BC00D1AFEF /* HBChapterTitlesController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HBChapterTitlesController.m; sourceTree = "<group>"; }; @@ -539,6 +588,9 @@ A932E26E198833920047D13E /* HBAudioDefaultsController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HBAudioDefaultsController.m; sourceTree = "<group>"; }; A932E271198834130047D13E /* HBAudioDefaults.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HBAudioDefaults.h; sourceTree = "<group>"; }; A932E272198834130047D13E /* HBAudioDefaults.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HBAudioDefaults.m; sourceTree = "<group>"; }; + A93341C4243E1583003A82C2 /* HandBrakeXPCService2.xpc */ = {isa = PBXFileReference; explicitFileType = "wrapper.xpc-service"; includeInIndex = 0; path = HandBrakeXPCService2.xpc; sourceTree = BUILT_PRODUCTS_DIR; }; + A93341D5243E158B003A82C2 /* HandBrakeXPCService3.xpc */ = {isa = PBXFileReference; explicitFileType = "wrapper.xpc-service"; includeInIndex = 0; path = HandBrakeXPCService3.xpc; sourceTree = BUILT_PRODUCTS_DIR; }; + A93341E6243E158E003A82C2 /* HandBrakeXPCService4.xpc */ = {isa = PBXFileReference; explicitFileType = "wrapper.xpc-service"; includeInIndex = 0; path = HandBrakeXPCService4.xpc; sourceTree = BUILT_PRODUCTS_DIR; }; A937EECA1C6C7C0300EEAE6D /* dsa_pub.pem */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = dsa_pub.pem; sourceTree = "<group>"; }; A939854D2231556D001DCAEB /* Sparkle.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Sparkle.framework; path = Sparkle/Sparkle.framework; sourceTree = "<group>"; }; A939855222315628001DCAEB /* org.sparkle-project.InstallerConnection.xpc */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.xpc-service"; name = "org.sparkle-project.InstallerConnection.xpc"; path = "Sparkle/org.sparkle-project.InstallerConnection.xpc"; sourceTree = SOURCE_ROOT; }; @@ -664,6 +716,9 @@ A97ED7FA22EC5E9300AEF29B /* HBQueueDetailsViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = HBQueueDetailsViewController.xib; sourceTree = "<group>"; }; A98036CB1CCA91DD007661AA /* HBAVPlayer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HBAVPlayer.h; sourceTree = "<group>"; }; A98036CC1CCA91DD007661AA /* HBAVPlayer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HBAVPlayer.m; sourceTree = "<group>"; }; + A9884FA4243E544800B61738 /* HandBrakeXPCService2.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = HandBrakeXPCService2.plist; sourceTree = "<group>"; }; + A9884FA6243E544E00B61738 /* HandBrakeXPCService3.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = HandBrakeXPCService3.plist; sourceTree = "<group>"; }; + A9884FA8243E545400B61738 /* HandBrakeXPCService4.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = HandBrakeXPCService4.plist; sourceTree = "<group>"; }; A988AF9B1BC7C35F00932543 /* HBChapter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HBChapter.h; sourceTree = "<group>"; }; A988AF9C1BC7C35F00932543 /* HBChapter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HBChapter.m; sourceTree = "<group>"; }; A98C29C21977B10600AF5DED /* HBLanguagesSelection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HBLanguagesSelection.h; sourceTree = "<group>"; }; @@ -682,6 +737,8 @@ A9A0CBE51CCEA1D10045B3DF /* HBPlayerTrack.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HBPlayerTrack.h; sourceTree = "<group>"; }; A9A0CBE61CCEA1D10045B3DF /* HBPlayerTrack.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HBPlayerTrack.m; sourceTree = "<group>"; }; A9A25D9B21182741005A8A0F /* CoreMedia.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreMedia.framework; path = System/Library/Frameworks/CoreMedia.framework; sourceTree = SDKROOT; }; + A9A5F7D3243DD90100C82EC8 /* HBQueueWorker.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = HBQueueWorker.h; sourceTree = "<group>"; }; + A9A5F7D4243DD90100C82EC8 /* HBQueueWorker.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = HBQueueWorker.m; sourceTree = "<group>"; }; A9A70DB621FB1A980038085A /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = ../en.lproj/InfoPlist.strings; sourceTree = "<group>"; }; A9A7E2791FE2A0B5006BE79F /* HBPreviewViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = HBPreviewViewController.h; sourceTree = "<group>"; }; A9A7E27A1FE2A0B5006BE79F /* HBPreviewViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = HBPreviewViewController.m; sourceTree = "<group>"; }; @@ -804,7 +861,7 @@ A9E2FD241A21BC4A000E8D3F /* HBAddPresetController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HBAddPresetController.h; sourceTree = "<group>"; }; A9E2FD251A21BC4A000E8D3F /* HBAddPresetController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HBAddPresetController.m; sourceTree = "<group>"; }; A9E52CD7218DD52A00E17B86 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/ExceptionAlert.xib; sourceTree = "<group>"; }; - A9E8F80423003B2F00AA14E9 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; }; + A9E8F80423003B2F00AA14E9 /* HandBrakeXPCService1.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = HandBrakeXPCService1.plist; sourceTree = "<group>"; }; A9EA43661A2210C400785E95 /* HBTableView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HBTableView.h; sourceTree = "<group>"; }; A9EA43671A2210C400785E95 /* HBTableView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HBTableView.m; sourceTree = "<group>"; }; A9F217E41E2F897D00C10C6E /* HandBrake.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = HandBrake.entitlements; sourceTree = "<group>"; }; @@ -908,6 +965,30 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + A93341BB243E1583003A82C2 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + A93341BC243E1583003A82C2 /* HandBrakeKit.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + A93341CC243E158B003A82C2 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + A93341CD243E158B003A82C2 /* HandBrakeKit.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + A93341DD243E158E003A82C2 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + A93341DE243E158E003A82C2 /* HandBrakeKit.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; A964D39222FDE8EE00DFCAEA /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; @@ -1041,6 +1122,9 @@ A9736F021C7DA5FE008F1D18 /* HandBrakeKit.framework */, A9736F0B1C7DA5FE008F1D18 /* HandBrakeKitTests.xctest */, A964D39522FDE8EE00DFCAEA /* HandBrakeXPCService.xpc */, + A93341C4243E1583003A82C2 /* HandBrakeXPCService2.xpc */, + A93341D5243E158B003A82C2 /* HandBrakeXPCService3.xpc */, + A93341E6243E158E003A82C2 /* HandBrakeXPCService4.xpc */, ); name = Products; sourceTree = "<group>"; @@ -1208,6 +1292,8 @@ A97ECB8122E1D85500570935 /* HBQueue.m */, A95BA15B220C968500A2F9F9 /* HBQueueItem.h */, A95BA15C220C968500A2F9F9 /* HBQueueItem.m */, + A9A5F7D3243DD90100C82EC8 /* HBQueueWorker.h */, + A9A5F7D4243DD90100C82EC8 /* HBQueueWorker.m */, A9AA447C1970726500D7DEFC /* HBQueueController.h */, A9906B2B1A710920001D82D5 /* HBQueueController.m */, A9A96BD220CAD63000A39AFB /* Queue.xib */, @@ -1227,6 +1313,8 @@ A97ED7F822EC5E9300AEF29B /* HBQueueDetailsViewController.h */, A97ED7F922EC5E9300AEF29B /* HBQueueDetailsViewController.m */, A97ED7FA22EC5E9300AEF29B /* HBQueueDetailsViewController.xib */, + A9150DAC243F7BE200694870 /* HBQueueDockTileController.h */, + A9150DAD243F7BE200694870 /* HBQueueDockTileController.m */, ); name = Queue; sourceTree = "<group>"; @@ -1401,7 +1489,10 @@ A964D39822FDE8EE00DFCAEA /* HandBrakeXPCService.h */, A964D39922FDE8EE00DFCAEA /* HandBrakeXPCService.m */, A964D39B22FDE8EE00DFCAEA /* main.m */, - A9E8F80423003B2F00AA14E9 /* Info.plist */, + A9E8F80423003B2F00AA14E9 /* HandBrakeXPCService1.plist */, + A9884FA4243E544800B61738 /* HandBrakeXPCService2.plist */, + A9884FA6243E544E00B61738 /* HandBrakeXPCService3.plist */, + A9884FA8243E545400B61738 /* HandBrakeXPCService4.plist */, A919992A23003CFC0037F526 /* Localizable.strings */, ); path = HandBrakeXPCService; @@ -1702,12 +1793,66 @@ dependencies = ( A91CE2EF1C7DB40D0068F46F /* PBXTargetDependency */, A964D39F22FDE8EE00DFCAEA /* PBXTargetDependency */, + A93341E9243E15B2003A82C2 /* PBXTargetDependency */, + A93341EB243E15B4003A82C2 /* PBXTargetDependency */, + A93341ED243E15B6003A82C2 /* PBXTargetDependency */, ); name = HandBrake; productName = HandBrake; productReference = 273F203914ADBC210021BE6D /* HandBrake.app */; productType = "com.apple.product-type.application"; }; + A93341B5243E1583003A82C2 /* HandBrakeXPCService2 */ = { + isa = PBXNativeTarget; + buildConfigurationList = A93341BF243E1583003A82C2 /* Build configuration list for PBXNativeTarget "HandBrakeXPCService2" */; + buildPhases = ( + A93341B6243E1583003A82C2 /* Sources */, + A93341BB243E1583003A82C2 /* Frameworks */, + A93341BD243E1583003A82C2 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = HandBrakeXPCService2; + productName = HandBrakeXPCService; + productReference = A93341C4243E1583003A82C2 /* HandBrakeXPCService2.xpc */; + productType = "com.apple.product-type.xpc-service"; + }; + A93341C6243E158B003A82C2 /* HandBrakeXPCService3 */ = { + isa = PBXNativeTarget; + buildConfigurationList = A93341D0243E158B003A82C2 /* Build configuration list for PBXNativeTarget "HandBrakeXPCService3" */; + buildPhases = ( + A93341C7243E158B003A82C2 /* Sources */, + A93341CC243E158B003A82C2 /* Frameworks */, + A93341CE243E158B003A82C2 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = HandBrakeXPCService3; + productName = HandBrakeXPCService; + productReference = A93341D5243E158B003A82C2 /* HandBrakeXPCService3.xpc */; + productType = "com.apple.product-type.xpc-service"; + }; + A93341D7243E158E003A82C2 /* HandBrakeXPCService4 */ = { + isa = PBXNativeTarget; + buildConfigurationList = A93341E1243E158E003A82C2 /* Build configuration list for PBXNativeTarget "HandBrakeXPCService4" */; + buildPhases = ( + A93341D8243E158E003A82C2 /* Sources */, + A93341DD243E158E003A82C2 /* Frameworks */, + A93341DF243E158E003A82C2 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = HandBrakeXPCService4; + productName = HandBrakeXPCService; + productReference = A93341E6243E158E003A82C2 /* HandBrakeXPCService4.xpc */; + productType = "com.apple.product-type.xpc-service"; + }; A964D39422FDE8EE00DFCAEA /* HandBrakeXPCService */ = { isa = PBXNativeTarget; buildConfigurationList = A964D3A522FDE8EE00DFCAEA /* Build configuration list for PBXNativeTarget "HandBrakeXPCService" */; @@ -1829,6 +1974,9 @@ A9736F0A1C7DA5FE008F1D18 /* HandBrakeKitTests */, 273F203814ADBC200021BE6D /* HandBrake */, A964D39422FDE8EE00DFCAEA /* HandBrakeXPCService */, + A93341B5243E1583003A82C2 /* HandBrakeXPCService2 */, + A93341C6243E158B003A82C2 /* HandBrakeXPCService3 */, + A93341D7243E158E003A82C2 /* HandBrakeXPCService4 */, ); }; /* End PBXProject section */ @@ -1884,6 +2032,30 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + A93341BD243E1583003A82C2 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + A951D9CA243E5B50002579F2 /* Localizable.strings in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + A93341CE243E158B003A82C2 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + A93341CF243E158B003A82C2 /* Localizable.strings in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + A93341DF243E158E003A82C2 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + A93341E0243E158E003A82C2 /* Localizable.strings in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; A964D39322FDE8EE00DFCAEA /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; @@ -2005,12 +2177,47 @@ A96127DF22E0994E0086E6DC /* HBQueueInfoViewController.m in Sources */, A97ECB8222E1D85500570935 /* HBQueue.m in Sources */, A92B148220CA9F7700146FD8 /* HBHUDView.m in Sources */, + A9150DAE243F7BE200694870 /* HBQueueDockTileController.m in Sources */, A9B3B63922E2EA58001CEB9A /* HBQueueItemWorkingView.m in Sources */, A914BCB31BC441C700157917 /* HBPreviewView.m in Sources */, 273F20B714ADBE670021BE6D /* HBPreviewController.m in Sources */, A9D1E41718262364002F6424 /* HBPreviewGenerator.m in Sources */, 273F20BA14ADBE670021BE6D /* HBPictureController.m in Sources */, A9CF25F71990D6820023F727 /* HBPresetsViewController.m in Sources */, + A9A5F7D5243DD90100C82EC8 /* HBQueueWorker.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + A93341B6243E1583003A82C2 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + A93341B7243E1583003A82C2 /* HBOutputRedirect.m in Sources */, + A93341B8243E1583003A82C2 /* main.m in Sources */, + A93341B9243E1583003A82C2 /* HandBrakeXPCService.m in Sources */, + A93341BA243E1583003A82C2 /* HBRedirect.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + A93341C7243E158B003A82C2 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + A93341C8243E158B003A82C2 /* HBOutputRedirect.m in Sources */, + A93341C9243E158B003A82C2 /* main.m in Sources */, + A93341CA243E158B003A82C2 /* HandBrakeXPCService.m in Sources */, + A93341CB243E158B003A82C2 /* HBRedirect.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + A93341D8243E158E003A82C2 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + A93341D9243E158E003A82C2 /* HBOutputRedirect.m in Sources */, + A93341DA243E158E003A82C2 /* main.m in Sources */, + A93341DB243E158E003A82C2 /* HandBrakeXPCService.m in Sources */, + A93341DC243E158E003A82C2 /* HBRedirect.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -2089,6 +2296,21 @@ target = 273F203814ADBC200021BE6D /* HandBrake */; targetProxy = A91CE2FF1C7DBA2C0068F46F /* PBXContainerItemProxy */; }; + A93341E9243E15B2003A82C2 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = A93341B5243E1583003A82C2 /* HandBrakeXPCService2 */; + targetProxy = A93341E8243E15B2003A82C2 /* PBXContainerItemProxy */; + }; + A93341EB243E15B4003A82C2 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = A93341C6243E158B003A82C2 /* HandBrakeXPCService3 */; + targetProxy = A93341EA243E15B4003A82C2 /* PBXContainerItemProxy */; + }; + A93341ED243E15B6003A82C2 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = A93341D7243E158E003A82C2 /* HandBrakeXPCService4 */; + targetProxy = A93341EC243E15B6003A82C2 /* PBXContainerItemProxy */; + }; A964D39F22FDE8EE00DFCAEA /* PBXTargetDependency */ = { isa = PBXTargetDependency; target = A964D39422FDE8EE00DFCAEA /* HandBrakeXPCService */; @@ -2829,6 +3051,744 @@ }; name = release; }; + A93341C0243E1583003A82C2 /* debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CODE_SIGN_IDENTITY = "-"; + COMBINE_HIDPI_IMAGES = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + DEVELOPMENT_TEAM = ""; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + INFOPLIST_FILE = HandBrakeXPCService/HandBrakeXPCService2.plist; + LD_RUNPATH_SEARCH_PATHS = "@executable_path/../../../../Frameworks"; + MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; + MTL_FAST_MATH = YES; + ONLY_ACTIVE_ARCH = YES; + PRODUCT_BUNDLE_IDENTIFIER = fr.handbrake.HandBrakeXPCService2; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = macosx; + SKIP_INSTALL = YES; + }; + name = debug; + }; + A93341C1243E1583003A82C2 /* debug-sandbox */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CODE_SIGN_ENTITLEMENTS = HandBrakeXPCService/HandBrakeXPCService.entitlements; + CODE_SIGN_IDENTITY = "-"; + COMBINE_HIDPI_IMAGES = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + DEVELOPMENT_TEAM = ""; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + INFOPLIST_FILE = HandBrakeXPCService/HandBrakeXPCService2.plist; + LD_RUNPATH_SEARCH_PATHS = "@executable_path/../../../../Frameworks"; + MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; + MTL_FAST_MATH = YES; + ONLY_ACTIVE_ARCH = YES; + PRODUCT_BUNDLE_IDENTIFIER = fr.handbrake.HandBrakeXPCService2; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = macosx; + SKIP_INSTALL = YES; + }; + name = "debug-sandbox"; + }; + A93341C2243E1583003A82C2 /* release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CODE_SIGN_IDENTITY = "-"; + COMBINE_HIDPI_IMAGES = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + DEVELOPMENT_TEAM = ""; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + INFOPLIST_FILE = HandBrakeXPCService/HandBrakeXPCService2.plist; + LD_RUNPATH_SEARCH_PATHS = "@executable_path/../../../../Frameworks"; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + PRODUCT_BUNDLE_IDENTIFIER = fr.handbrake.HandBrakeXPCService2; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = macosx; + SKIP_INSTALL = YES; + }; + name = release; + }; + A93341C3243E1583003A82C2 /* release-sandbox */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CODE_SIGN_ENTITLEMENTS = HandBrakeXPCService/HandBrakeXPCService.entitlements; + CODE_SIGN_IDENTITY = "-"; + COMBINE_HIDPI_IMAGES = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + DEVELOPMENT_TEAM = ""; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + INFOPLIST_FILE = HandBrakeXPCService/HandBrakeXPCService2.plist; + LD_RUNPATH_SEARCH_PATHS = "@executable_path/../../../../Frameworks"; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + PRODUCT_BUNDLE_IDENTIFIER = fr.handbrake.HandBrakeXPCService2; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = macosx; + SKIP_INSTALL = YES; + }; + name = "release-sandbox"; + }; + A93341D1243E158B003A82C2 /* debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CODE_SIGN_IDENTITY = "-"; + COMBINE_HIDPI_IMAGES = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + DEVELOPMENT_TEAM = ""; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + INFOPLIST_FILE = HandBrakeXPCService/HandBrakeXPCService3.plist; + LD_RUNPATH_SEARCH_PATHS = "@executable_path/../../../../Frameworks"; + MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; + MTL_FAST_MATH = YES; + ONLY_ACTIVE_ARCH = YES; + PRODUCT_BUNDLE_IDENTIFIER = fr.handbrake.HandBrakeXPCService3; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = macosx; + SKIP_INSTALL = YES; + }; + name = debug; + }; + A93341D2243E158B003A82C2 /* debug-sandbox */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CODE_SIGN_ENTITLEMENTS = HandBrakeXPCService/HandBrakeXPCService.entitlements; + CODE_SIGN_IDENTITY = "-"; + COMBINE_HIDPI_IMAGES = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + DEVELOPMENT_TEAM = ""; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + INFOPLIST_FILE = HandBrakeXPCService/HandBrakeXPCService3.plist; + LD_RUNPATH_SEARCH_PATHS = "@executable_path/../../../../Frameworks"; + MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; + MTL_FAST_MATH = YES; + ONLY_ACTIVE_ARCH = YES; + PRODUCT_BUNDLE_IDENTIFIER = fr.handbrake.HandBrakeXPCService3; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = macosx; + SKIP_INSTALL = YES; + }; + name = "debug-sandbox"; + }; + A93341D3243E158B003A82C2 /* release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CODE_SIGN_IDENTITY = "-"; + COMBINE_HIDPI_IMAGES = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + DEVELOPMENT_TEAM = ""; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + INFOPLIST_FILE = HandBrakeXPCService/HandBrakeXPCService3.plist; + LD_RUNPATH_SEARCH_PATHS = "@executable_path/../../../../Frameworks"; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + PRODUCT_BUNDLE_IDENTIFIER = fr.handbrake.HandBrakeXPCService3; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = macosx; + SKIP_INSTALL = YES; + }; + name = release; + }; + A93341D4243E158B003A82C2 /* release-sandbox */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CODE_SIGN_ENTITLEMENTS = HandBrakeXPCService/HandBrakeXPCService.entitlements; + CODE_SIGN_IDENTITY = "-"; + COMBINE_HIDPI_IMAGES = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + DEVELOPMENT_TEAM = ""; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + INFOPLIST_FILE = HandBrakeXPCService/HandBrakeXPCService3.plist; + LD_RUNPATH_SEARCH_PATHS = "@executable_path/../../../../Frameworks"; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + PRODUCT_BUNDLE_IDENTIFIER = fr.handbrake.HandBrakeXPCService3; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = macosx; + SKIP_INSTALL = YES; + }; + name = "release-sandbox"; + }; + A93341E2243E158E003A82C2 /* debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CODE_SIGN_IDENTITY = "-"; + COMBINE_HIDPI_IMAGES = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + DEVELOPMENT_TEAM = ""; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + INFOPLIST_FILE = HandBrakeXPCService/HandBrakeXPCService4.plist; + LD_RUNPATH_SEARCH_PATHS = "@executable_path/../../../../Frameworks"; + MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; + MTL_FAST_MATH = YES; + ONLY_ACTIVE_ARCH = YES; + PRODUCT_BUNDLE_IDENTIFIER = fr.handbrake.HandBrakeXPCService4; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = macosx; + SKIP_INSTALL = YES; + }; + name = debug; + }; + A93341E3243E158E003A82C2 /* debug-sandbox */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CODE_SIGN_ENTITLEMENTS = HandBrakeXPCService/HandBrakeXPCService.entitlements; + CODE_SIGN_IDENTITY = "-"; + COMBINE_HIDPI_IMAGES = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + DEVELOPMENT_TEAM = ""; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + INFOPLIST_FILE = HandBrakeXPCService/HandBrakeXPCService4.plist; + LD_RUNPATH_SEARCH_PATHS = "@executable_path/../../../../Frameworks"; + MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; + MTL_FAST_MATH = YES; + ONLY_ACTIVE_ARCH = YES; + PRODUCT_BUNDLE_IDENTIFIER = fr.handbrake.HandBrakeXPCService4; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = macosx; + SKIP_INSTALL = YES; + }; + name = "debug-sandbox"; + }; + A93341E4243E158E003A82C2 /* release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CODE_SIGN_IDENTITY = "-"; + COMBINE_HIDPI_IMAGES = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + DEVELOPMENT_TEAM = ""; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + INFOPLIST_FILE = HandBrakeXPCService/HandBrakeXPCService4.plist; + LD_RUNPATH_SEARCH_PATHS = "@executable_path/../../../../Frameworks"; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + PRODUCT_BUNDLE_IDENTIFIER = fr.handbrake.HandBrakeXPCService4; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = macosx; + SKIP_INSTALL = YES; + }; + name = release; + }; + A93341E5243E158E003A82C2 /* release-sandbox */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CODE_SIGN_ENTITLEMENTS = HandBrakeXPCService/HandBrakeXPCService.entitlements; + CODE_SIGN_IDENTITY = "-"; + COMBINE_HIDPI_IMAGES = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + DEVELOPMENT_TEAM = ""; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + INFOPLIST_FILE = HandBrakeXPCService/HandBrakeXPCService4.plist; + LD_RUNPATH_SEARCH_PATHS = "@executable_path/../../../../Frameworks"; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + PRODUCT_BUNDLE_IDENTIFIER = fr.handbrake.HandBrakeXPCService4; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = macosx; + SKIP_INSTALL = YES; + }; + name = "release-sandbox"; + }; A964D3A122FDE8EE00DFCAEA /* debug */ = { isa = XCBuildConfiguration; buildSettings = { @@ -2881,7 +3841,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - INFOPLIST_FILE = HandBrakeXPCService/Info.plist; + INFOPLIST_FILE = HandBrakeXPCService/HandBrakeXPCService1.plist; LD_RUNPATH_SEARCH_PATHS = "@executable_path/../../../../Frameworks"; MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; MTL_FAST_MATH = YES; @@ -2946,7 +3906,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - INFOPLIST_FILE = HandBrakeXPCService/Info.plist; + INFOPLIST_FILE = HandBrakeXPCService/HandBrakeXPCService1.plist; LD_RUNPATH_SEARCH_PATHS = "@executable_path/../../../../Frameworks"; MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; MTL_FAST_MATH = YES; @@ -3005,7 +3965,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - INFOPLIST_FILE = HandBrakeXPCService/Info.plist; + INFOPLIST_FILE = HandBrakeXPCService/HandBrakeXPCService1.plist; LD_RUNPATH_SEARCH_PATHS = "@executable_path/../../../../Frameworks"; MTL_ENABLE_DEBUG_INFO = NO; MTL_FAST_MATH = YES; @@ -3064,7 +4024,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - INFOPLIST_FILE = HandBrakeXPCService/Info.plist; + INFOPLIST_FILE = HandBrakeXPCService/HandBrakeXPCService1.plist; LD_RUNPATH_SEARCH_PATHS = "@executable_path/../../../../Frameworks"; MTL_ENABLE_DEBUG_INFO = NO; MTL_FAST_MATH = YES; @@ -3930,6 +4890,39 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = release; }; + A93341BF243E1583003A82C2 /* Build configuration list for PBXNativeTarget "HandBrakeXPCService2" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + A93341C0243E1583003A82C2 /* debug */, + A93341C1243E1583003A82C2 /* debug-sandbox */, + A93341C2243E1583003A82C2 /* release */, + A93341C3243E1583003A82C2 /* release-sandbox */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = release; + }; + A93341D0243E158B003A82C2 /* Build configuration list for PBXNativeTarget "HandBrakeXPCService3" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + A93341D1243E158B003A82C2 /* debug */, + A93341D2243E158B003A82C2 /* debug-sandbox */, + A93341D3243E158B003A82C2 /* release */, + A93341D4243E158B003A82C2 /* release-sandbox */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = release; + }; + A93341E1243E158E003A82C2 /* Build configuration list for PBXNativeTarget "HandBrakeXPCService4" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + A93341E2243E158E003A82C2 /* debug */, + A93341E3243E158E003A82C2 /* debug-sandbox */, + A93341E4243E158E003A82C2 /* release */, + A93341E5243E158E003A82C2 /* release-sandbox */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = release; + }; A964D3A522FDE8EE00DFCAEA /* Build configuration list for PBXNativeTarget "HandBrakeXPCService" */ = { isa = XCConfigurationList; buildConfigurations = ( diff --git a/macosx/HandBrakeXPCService/HBRemoteCoreProtocol.h b/macosx/HandBrakeXPCService/HBRemoteCoreProtocol.h index 37fc73e2d..97c8870ef 100644 --- a/macosx/HandBrakeXPCService/HBRemoteCoreProtocol.h +++ b/macosx/HandBrakeXPCService/HBRemoteCoreProtocol.h @@ -19,6 +19,11 @@ NS_ASSUME_NONNULL_BEGIN - (void)provideResourceAccessWithBookmarks:(NSArray<NSData *> *)bookmarks; +- (void)setAutomaticallyPreventSleep:(BOOL)automaticallyPreventSleep; + +- (void)preventSleep; +- (void)allowSleep; + - (void)scanURL:(NSURL *)url titleIndex:(NSUInteger)index previews:(NSUInteger)previewsNum minDuration:(NSUInteger)seconds keepPreviews:(BOOL)keepPreviews withReply:(void (^)(HBCoreResult))reply; - (void)cancelScan; diff --git a/macosx/HandBrakeXPCService/HandBrakeXPCService.m b/macosx/HandBrakeXPCService/HandBrakeXPCService.m index 34d3c04cb..facf01268 100644 --- a/macosx/HandBrakeXPCService/HandBrakeXPCService.m +++ b/macosx/HandBrakeXPCService/HandBrakeXPCService.m @@ -57,7 +57,6 @@ static void *HandBrakeXPCServiceContext = &HandBrakeXPCServiceContext; _core = [[HBCore alloc] initWithLogLevel:level queue:_queue]; _core.name = name; - _core.automaticallyPreventSleep = NO; // Completion handler void (^completionHandler)(HBCoreResult result) = ^(HBCoreResult result) @@ -106,6 +105,13 @@ static void *HandBrakeXPCServiceContext = &HandBrakeXPCServiceContext; }); } +- (void)setAutomaticallyPreventSleep:(BOOL)automaticallyPreventSleep +{ + dispatch_sync(_queue, ^{ + self.core.automaticallyPreventSleep = automaticallyPreventSleep; + }); +} + - (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context { if (context == HandBrakeXPCServiceContext) @@ -118,6 +124,20 @@ static void *HandBrakeXPCServiceContext = &HandBrakeXPCServiceContext; } } +- (void)preventSleep +{ + dispatch_sync(_queue, ^{ + [self.core preventSleep]; + }); +} + +- (void)allowSleep +{ + dispatch_sync(_queue, ^{ + [self.core allowSleep]; + }); +} + - (void)scanURL:(NSURL *)url titleIndex:(NSUInteger)index previews:(NSUInteger)previewsNum minDuration:(NSUInteger)seconds keepPreviews:(BOOL)keepPreviews withReply:(void (^)(HBCoreResult))reply { dispatch_sync(_queue, ^{ diff --git a/macosx/HandBrakeXPCService/Info.plist b/macosx/HandBrakeXPCService/HandBrakeXPCService1.plist index 78928db23..78928db23 100644 --- a/macosx/HandBrakeXPCService/Info.plist +++ b/macosx/HandBrakeXPCService/HandBrakeXPCService1.plist diff --git a/macosx/HandBrakeXPCService/HandBrakeXPCService2.plist b/macosx/HandBrakeXPCService/HandBrakeXPCService2.plist new file mode 100644 index 000000000..78928db23 --- /dev/null +++ b/macosx/HandBrakeXPCService/HandBrakeXPCService2.plist @@ -0,0 +1,29 @@ +<?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>$(DEVELOPMENT_LANGUAGE)</string> + <key>CFBundleDisplayName</key> + <string>HandBrakeXPCService</string> + <key>CFBundleExecutable</key> + <string>$(EXECUTABLE_NAME)</string> + <key>CFBundleIdentifier</key> + <string>$(PRODUCT_BUNDLE_IDENTIFIER)</string> + <key>CFBundleInfoDictionaryVersion</key> + <string>6.0</string> + <key>CFBundleName</key> + <string>$(PRODUCT_NAME)</string> + <key>CFBundlePackageType</key> + <string>XPC!</string> + <key>CFBundleShortVersionString</key> + <string>1.0</string> + <key>CFBundleVersion</key> + <string>1</string> + <key>XPCService</key> + <dict> + <key>ServiceType</key> + <string>Application</string> + </dict> +</dict> +</plist> diff --git a/macosx/HandBrakeXPCService/HandBrakeXPCService3.plist b/macosx/HandBrakeXPCService/HandBrakeXPCService3.plist new file mode 100644 index 000000000..78928db23 --- /dev/null +++ b/macosx/HandBrakeXPCService/HandBrakeXPCService3.plist @@ -0,0 +1,29 @@ +<?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>$(DEVELOPMENT_LANGUAGE)</string> + <key>CFBundleDisplayName</key> + <string>HandBrakeXPCService</string> + <key>CFBundleExecutable</key> + <string>$(EXECUTABLE_NAME)</string> + <key>CFBundleIdentifier</key> + <string>$(PRODUCT_BUNDLE_IDENTIFIER)</string> + <key>CFBundleInfoDictionaryVersion</key> + <string>6.0</string> + <key>CFBundleName</key> + <string>$(PRODUCT_NAME)</string> + <key>CFBundlePackageType</key> + <string>XPC!</string> + <key>CFBundleShortVersionString</key> + <string>1.0</string> + <key>CFBundleVersion</key> + <string>1</string> + <key>XPCService</key> + <dict> + <key>ServiceType</key> + <string>Application</string> + </dict> +</dict> +</plist> diff --git a/macosx/HandBrakeXPCService/HandBrakeXPCService4.plist b/macosx/HandBrakeXPCService/HandBrakeXPCService4.plist new file mode 100644 index 000000000..78928db23 --- /dev/null +++ b/macosx/HandBrakeXPCService/HandBrakeXPCService4.plist @@ -0,0 +1,29 @@ +<?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>$(DEVELOPMENT_LANGUAGE)</string> + <key>CFBundleDisplayName</key> + <string>HandBrakeXPCService</string> + <key>CFBundleExecutable</key> + <string>$(EXECUTABLE_NAME)</string> + <key>CFBundleIdentifier</key> + <string>$(PRODUCT_BUNDLE_IDENTIFIER)</string> + <key>CFBundleInfoDictionaryVersion</key> + <string>6.0</string> + <key>CFBundleName</key> + <string>$(PRODUCT_NAME)</string> + <key>CFBundlePackageType</key> + <string>XPC!</string> + <key>CFBundleShortVersionString</key> + <string>1.0</string> + <key>CFBundleVersion</key> + <string>1</string> + <key>XPCService</key> + <dict> + <key>ServiceType</key> + <string>Application</string> + </dict> +</dict> +</plist> diff --git a/macosx/NSArray+HBAdditions.h b/macosx/NSArray+HBAdditions.h index 414dcf1dd..1932bf269 100644 --- a/macosx/NSArray+HBAdditions.h +++ b/macosx/NSArray+HBAdditions.h @@ -16,5 +16,12 @@ NS_ASSUME_NONNULL_BEGIN @end +@interface NSIndexSet (HBAdditions) + +- (NSIndexSet *)unionWith:(NSIndexSet *)indexSet; +- (NSIndexSet *)intersectionWith:(NSIndexSet *)indexSet; + +@end + NS_ASSUME_NONNULL_END diff --git a/macosx/NSArray+HBAdditions.m b/macosx/NSArray+HBAdditions.m index 540c571b9..f24417632 100644 --- a/macosx/NSArray+HBAdditions.m +++ b/macosx/NSArray+HBAdditions.m @@ -49,3 +49,39 @@ } @end + +@implementation NSIndexSet (HBAdditions) + +- (NSIndexSet *)unionWith:(NSIndexSet *)indexSet +{ + NSMutableIndexSet *result = [self mutableCopy]; + [result addIndexes:indexSet]; + return result; +} + +- (NSIndexSet *)intersectionWith:(NSIndexSet *)indexSet +{ + NSMutableIndexSet *result = [self mutableCopy]; + [result addIndexes:indexSet]; + [result removeIndexes:[self symmetricDifferenceWith:indexSet]]; + return result; +} + +- (NSIndexSet *)relativeComplementIn:(NSIndexSet *)universe +{ + NSMutableIndexSet *complement = [universe mutableCopy]; + [complement removeIndexes:self]; + return complement; +} + +- (NSIndexSet *)symmetricDifferenceWith:(NSIndexSet *)indexSet +{ + NSMutableIndexSet *a = [self mutableCopy]; + NSMutableIndexSet *b = [indexSet mutableCopy]; + [a removeIndexes:indexSet]; + [b removeIndexes:self]; + [a addIndexes:b]; + return a; +} + +@end |