Add a queue action to set the color space.

This commit is contained in:
Damiano Galassi committed 2017-01-12 12:17:06 +01:00
1 parent ff5e97e4b3
commit 5968378131
7 files changed
+217 -30

No files matched your search

+81 -24
View File
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="11761" systemVersion="16C53a" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="11762" systemVersion="16D25a" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
<dependencies>
<deployment identifier="macosx"/>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="11761"/>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="11762"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
@@ -15,7 +15,7 @@
<customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
<customObject id="-3" userLabel="Application" customClass="NSObject"/>
<customView id="UlG-O3-eNc" userLabel="OptionsView">
<rect key="frame" x="0.0" y="0.0" width="357" height="411"/>
<rect key="frame" x="0.0" y="0.0" width="370" height="447"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<subviews>
<button translatesAutoresizingMaskIntoConstraints="NO" id="zEH-aV-Tl7">
@@ -33,7 +33,7 @@
</connections>
</button>
<button toolTip="Search metadata online" translatesAutoresizingMaskIntoConstraints="NO" id="9GN-f6-r2j">
<rect key="frame" x="110" y="385" width="105" height="18"/>
<rect key="frame" x="110" y="421" width="105" height="18"/>
<buttonCell key="cell" type="check" title="Fetch Metadata" bezelStyle="regularSquare" imagePosition="left" alignment="left" controlSize="small" state="on" inset="2" id="QNO-e1-WUJ">
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
<font key="font" metaFont="smallSystem"/>
@@ -61,7 +61,7 @@
</connections>
</button>
<button toolTip="Organize the mp4 alternate groups" translatesAutoresizingMaskIntoConstraints="NO" id="ccd-Xn-Dj3">
<rect key="frame" x="110" y="242" width="111" height="18"/>
<rect key="frame" x="110" y="278" width="111" height="18"/>
<buttonCell key="cell" type="check" title="Organize Groups" bezelStyle="regularSquare" imagePosition="left" alignment="left" controlSize="small" state="on" inset="2" id="240-c7-2UW">
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
<font key="font" metaFont="smallSystem"/>
@@ -75,7 +75,7 @@
</connections>
</button>
<button toolTip="Load the external srt subtitles file" translatesAutoresizingMaskIntoConstraints="NO" id="etc-K7-Atw">
<rect key="frame" x="110" y="206" width="142" height="18"/>
<rect key="frame" x="110" y="242" width="142" height="18"/>
<buttonCell key="cell" type="check" title="Load external subtitles" bezelStyle="regularSquare" imagePosition="left" alignment="left" controlSize="small" state="on" inset="2" id="59T-kp-mV1">
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
<font key="font" metaFont="smallSystem"/>
@@ -158,7 +158,7 @@
</textFieldCell>
</textField>
<textField verticalHuggingPriority="750" preferredMaxLayoutWidth="200" translatesAutoresizingMaskIntoConstraints="NO" id="eTL-yP-QQ5">
<rect key="frame" x="123" y="366" width="48" height="14"/>
<rect key="frame" x="123" y="402" width="48" height="14"/>
<textFieldCell key="cell" controlSize="small" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="Movies:" id="W6m-cd-JMe">
<font key="font" metaFont="smallSystemBold"/>
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
@@ -169,7 +169,7 @@
</connections>
</textField>
<textField verticalHuggingPriority="750" preferredMaxLayoutWidth="200" translatesAutoresizingMaskIntoConstraints="NO" id="bDo-OD-bck">
<rect key="frame" x="123" y="320" width="63" height="14"/>
<rect key="frame" x="123" y="356" width="63" height="14"/>
<textFieldCell key="cell" controlSize="small" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="TV Shows:" id="PCe-Pw-D2s">
<font key="font" metaFont="smallSystemBold"/>
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
@@ -188,7 +188,7 @@
</textFieldCell>
</textField>
<textField verticalHuggingPriority="750" preferredMaxLayoutWidth="200" translatesAutoresizingMaskIntoConstraints="NO" id="S7L-mA-j3Y">
<rect key="frame" x="18" y="387" width="89" height="14"/>
<rect key="frame" x="18" y="423" width="89" height="14"/>
<textFieldCell key="cell" controlSize="small" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" alignment="right" title="Add item:" id="9ls-xq-YGz">
<font key="font" metaFont="smallSystemBold"/>
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
@@ -225,7 +225,7 @@
</connections>
</popUpButton>
<popUpButton verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="ZVm-yi-3cE">
<rect key="frame" x="177" y="365" width="111" height="17"/>
<rect key="frame" x="177" y="401" width="111" height="17"/>
<constraints>
<constraint firstAttribute="width" constant="111" id="GuB-yU-C8O"/>
</constraints>
@@ -252,7 +252,7 @@
</connections>
</popUpButton>
<popUpButton verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="tLh-V3-OfB">
<rect key="frame" x="192" y="319" width="111" height="17"/>
<rect key="frame" x="192" y="355" width="111" height="17"/>
<popUpButtonCell key="cell" type="roundRect" bezelStyle="roundedRect" alignment="left" controlSize="small" lineBreakMode="truncatingTail" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="UOb-Qe-IPw">
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="smallSystem"/>
@@ -276,7 +276,7 @@
</connections>
</popUpButton>
<textField verticalHuggingPriority="750" preferredMaxLayoutWidth="200" translatesAutoresizingMaskIntoConstraints="NO" id="BWL-Nn-iGH">
<rect key="frame" x="133" y="300" width="63" height="14"/>
<rect key="frame" x="133" y="336" width="63" height="14"/>
<textFieldCell key="cell" controlSize="small" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="Language:" id="1dC-y4-0rx">
<font key="font" metaFont="smallSystemBold"/>
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
@@ -287,7 +287,7 @@
</connections>
</textField>
<textField verticalHuggingPriority="750" preferredMaxLayoutWidth="200" translatesAutoresizingMaskIntoConstraints="NO" id="Ns9-7q-hsh">
<rect key="frame" x="123" y="273" width="54" height="14"/>
<rect key="frame" x="123" y="309" width="54" height="14"/>
<textFieldCell key="cell" controlSize="small" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="Artwork:" id="1HP-Np-D97">
<font key="font" metaFont="smallSystemBold"/>
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
@@ -298,7 +298,7 @@
</connections>
</textField>
<popUpButton verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="Ce4-O7-Iu4">
<rect key="frame" x="202" y="299" width="111" height="17"/>
<rect key="frame" x="202" y="335" width="111" height="17"/>
<popUpButtonCell key="cell" type="roundRect" bezelStyle="roundedRect" alignment="left" controlSize="small" lineBreakMode="truncatingTail" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="nqF-p0-mT7">
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="smallSystem"/>
@@ -323,7 +323,7 @@
</connections>
</popUpButton>
<textField verticalHuggingPriority="750" preferredMaxLayoutWidth="200" translatesAutoresizingMaskIntoConstraints="NO" id="73q-gi-fe2">
<rect key="frame" x="133" y="346" width="63" height="14"/>
<rect key="frame" x="133" y="382" width="63" height="14"/>
<textFieldCell key="cell" controlSize="small" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="Language:" id="VkG-jW-ibO">
<font key="font" metaFont="smallSystemBold"/>
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
@@ -334,7 +334,7 @@
</connections>
</textField>
<popUpButton verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="5rh-cM-iOg">
<rect key="frame" x="202" y="345" width="111" height="17"/>
<rect key="frame" x="202" y="381" width="111" height="17"/>
<popUpButtonCell key="cell" type="roundRect" bezelStyle="roundedRect" alignment="left" controlSize="small" lineBreakMode="truncatingTail" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="gZb-sF-UQs">
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="smallSystem"/>
@@ -359,7 +359,7 @@
</connections>
</popUpButton>
<button toolTip="Organize the mp4 alternate groups" translatesAutoresizingMaskIntoConstraints="NO" id="TV6-Sk-Bqr">
<rect key="frame" x="110" y="224" width="119" height="18"/>
<rect key="frame" x="110" y="260" width="119" height="18"/>
<buttonCell key="cell" type="check" title="Fix audio fallbacks" bezelStyle="regularSquare" imagePosition="left" alignment="left" controlSize="small" state="on" inset="2" id="W6u-1c-BsI">
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
<font key="font" metaFont="smallSystem"/>
@@ -373,7 +373,7 @@
</connections>
</button>
<button toolTip="Set the track without a language to the selected one" translatesAutoresizingMaskIntoConstraints="NO" id="slL-2h-MPl">
<rect key="frame" x="110" y="170" width="160" height="18"/>
<rect key="frame" x="110" y="206" width="160" height="18"/>
<buttonCell key="cell" type="check" title="Complete tracks language" bezelStyle="regularSquare" imagePosition="left" alignment="left" controlSize="small" state="on" inset="2" id="cxz-2q-RIP">
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
<font key="font" metaFont="smallSystem"/>
@@ -387,7 +387,7 @@
</connections>
</button>
<textField verticalHuggingPriority="750" preferredMaxLayoutWidth="200" translatesAutoresizingMaskIntoConstraints="NO" id="swT-iM-shZ">
<rect key="frame" x="133" y="153" width="63" height="14"/>
<rect key="frame" x="133" y="189" width="63" height="14"/>
<textFieldCell key="cell" controlSize="small" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" alignment="right" title="Language:" id="GBM-Sa-9GJ">
<font key="font" metaFont="smallSystemBold"/>
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
@@ -398,7 +398,7 @@
</connections>
</textField>
<popUpButton verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="ZZk-4j-Ji7">
<rect key="frame" x="203" y="152" width="111" height="17"/>
<rect key="frame" x="203" y="188" width="111" height="17"/>
<constraints>
<constraint firstAttribute="width" constant="111" id="jXG-U4-57N"/>
</constraints>
@@ -440,7 +440,7 @@
</connections>
</button>
<button toolTip="Load the external srt subtitles file" translatesAutoresizingMaskIntoConstraints="NO" id="22k-mA-HyA">
<rect key="frame" x="110" y="188" width="123" height="18"/>
<rect key="frame" x="110" y="224" width="123" height="18"/>
<buttonCell key="cell" type="check" title="Clear tracks names" bezelStyle="regularSquare" imagePosition="left" alignment="left" controlSize="small" state="on" inset="2" id="mtK-5C-Pzh">
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
<font key="font" metaFont="smallSystem"/>
@@ -454,7 +454,7 @@
</connections>
</button>
<popUpButton verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="08Q-2k-0Gb">
<rect key="frame" x="183" y="271" width="109" height="17"/>
<rect key="frame" x="183" y="307" width="109" height="17"/>
<popUpButtonCell key="cell" type="roundRect" title="Provider Default" bezelStyle="roundedRect" alignment="left" controlSize="small" lineBreakMode="truncatingTail" state="on" borderStyle="border" imageScaling="proportionallyDown" inset="2" selectedItem="YjX-6f-SPu" id="1t8-o9-ckI">
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="smallSystem"/>
@@ -481,6 +481,55 @@
<binding destination="-2" name="enabled" keyPath="self.options.SBQueueMetadata" id="Iqc-R5-L9d"/>
</connections>
</popUpButton>
<button toolTip="Set the track without a language to the selected one" translatesAutoresizingMaskIntoConstraints="NO" id="Pdq-s0-erT">
<rect key="frame" x="110" y="170" width="116" height="18"/>
<buttonCell key="cell" type="check" title="Apply color space" bezelStyle="regularSquare" imagePosition="left" alignment="left" controlSize="small" state="on" inset="2" id="0By-RQ-4mS">
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
<font key="font" metaFont="smallSystem"/>
</buttonCell>
<connections>
<binding destination="-2" name="value" keyPath="self.options.SBQueueApplyColorSpace" id="r0h-Xs-HVb">
<dictionary key="options">
<bool key="NSValidatesImmediately" value="YES"/>
</dictionary>
</binding>
</connections>
</button>
<textField verticalHuggingPriority="750" preferredMaxLayoutWidth="200" translatesAutoresizingMaskIntoConstraints="NO" id="2Hf-2V-95U">
<rect key="frame" x="133" y="154" width="76" height="14"/>
<textFieldCell key="cell" controlSize="small" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" alignment="right" title="Color Space:" id="tMS-Tg-pPf">
<font key="font" metaFont="smallSystemBold"/>
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
<connections>
<binding destination="-2" name="enabled" keyPath="self.options.SBQueueFixTrackLanguage" id="Auc-OW-gNu"/>
</connections>
</textField>
<popUpButton verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="s2g-Iz-52P">
<rect key="frame" x="216" y="152" width="111" height="17"/>
<constraints>
<constraint firstAttribute="width" constant="111" id="57c-cZ-60x"/>
</constraints>
<popUpButtonCell key="cell" type="roundRect" title="Implicit" bezelStyle="roundedRect" alignment="left" controlSize="small" lineBreakMode="truncatingTail" state="on" borderStyle="border" tag="1" imageScaling="proportionallyDown" inset="2" selectedItem="psY-0V-t0k" id="QT5-Bh-4Hc">
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="smallSystem"/>
<menu key="menu" title="OtherViews" id="t0P-DA-u8W">
<items>
<menuItem title="Implicit" state="on" tag="1" id="psY-0V-t0k"/>
<menuItem title="Rec. 601 (5-1-6)" tag="2" id="ge0-Fr-3vK"/>
<menuItem title="Rec. 601 (6-1-6)" tag="3" id="AZx-uM-CmZ"/>
<menuItem title="Rec. 709 (1-1-1)" tag="4" id="1uU-j6-SSj"/>
<menuItem title="Rec. 2020 (9-1-9)" tag="5" id="Tjn-8g-7PM"/>
</items>
</menu>
</popUpButtonCell>
<connections>
<accessibilityConnection property="title" destination="2Hf-2V-95U" id="Eze-Wq-wVA"/>
<binding destination="-2" name="enabled" keyPath="self.options.SBQueueApplyColorSpace" id="XuE-t2-UYJ"/>
<binding destination="-2" name="selectedTag" keyPath="options.SBQueueApplyColorSpaceValue" id="7tY-4O-RMF"/>
</connections>
</popUpButton>
</subviews>
<constraints>
<constraint firstAttribute="trailing" relation="greaterThanOrEqual" secondItem="slL-2h-MPl" secondAttribute="trailing" constant="20" id="0EO-hK-q5e"/>
@@ -489,6 +538,7 @@
<constraint firstItem="86l-GG-SpO" firstAttribute="baseline" secondItem="vJ5-JB-k1m" secondAttribute="baseline" id="30V-Om-Uhz"/>
<constraint firstItem="86l-GG-SpO" firstAttribute="top" secondItem="DVM-Js-DwK" secondAttribute="bottom" constant="4" id="3mA-zf-zZm"/>
<constraint firstItem="ZZk-4j-Ji7" firstAttribute="top" secondItem="slL-2h-MPl" secondAttribute="bottom" constant="4" id="3me-TJ-211"/>
<constraint firstItem="s2g-Iz-52P" firstAttribute="top" secondItem="Pdq-s0-erT" secondAttribute="bottom" constant="4" id="5h8-Fg-jnN"/>
<constraint firstItem="Ns9-7q-hsh" firstAttribute="leading" secondItem="bDo-OD-bck" secondAttribute="leading" id="5sA-0F-meJ"/>
<constraint firstItem="muY-E0-hVI" firstAttribute="width" secondItem="vJ5-JB-k1m" secondAttribute="width" id="5tG-uE-aeE"/>
<constraint firstAttribute="trailing" relation="greaterThanOrEqual" secondItem="5rh-cM-iOg" secondAttribute="trailing" priority="750" constant="20" id="7Da-zR-5Y7"/>
@@ -496,7 +546,6 @@
<constraint firstItem="NhN-Lg-awX" firstAttribute="baseline" secondItem="DVM-Js-DwK" secondAttribute="baseline" id="8Cp-6o-kA4"/>
<constraint firstItem="DVM-Js-DwK" firstAttribute="leading" secondItem="NhN-Lg-awX" secondAttribute="trailing" constant="5" id="A1k-kg-a8J"/>
<constraint firstItem="ccd-Xn-Dj3" firstAttribute="top" secondItem="08Q-2k-0Gb" secondAttribute="bottom" constant="15" id="Bq9-Tm-H1q"/>
<constraint firstItem="DVM-Js-DwK" firstAttribute="top" secondItem="ZZk-4j-Ji7" secondAttribute="bottom" constant="16" id="Ckz-u5-DHH"/>
<constraint firstItem="etc-K7-Atw" firstAttribute="top" secondItem="TV6-Sk-Bqr" secondAttribute="bottom" constant="6" id="DLe-Jt-ggK"/>
<constraint firstItem="tLh-V3-OfB" firstAttribute="baseline" secondItem="bDo-OD-bck" secondAttribute="baseline" id="DkA-18-WbB"/>
<constraint firstItem="Ce4-O7-Iu4" firstAttribute="leading" secondItem="BWL-Nn-iGH" secondAttribute="trailing" constant="8" id="Eed-Ur-ajn"/>
@@ -506,14 +555,18 @@
<constraint firstItem="tLh-V3-OfB" firstAttribute="top" secondItem="5rh-cM-iOg" secondAttribute="bottom" constant="10" id="Hub-uy-myD"/>
<constraint firstAttribute="trailing" relation="greaterThanOrEqual" secondItem="22k-mA-HyA" secondAttribute="trailing" constant="20" id="I8x-Nb-QqZ"/>
<constraint firstItem="9GN-f6-r2j" firstAttribute="leading" secondItem="S7L-mA-j3Y" secondAttribute="trailing" constant="8" id="IXr-XJ-eo1"/>
<constraint firstAttribute="trailing" relation="greaterThanOrEqual" secondItem="s2g-Iz-52P" secondAttribute="trailing" constant="20" id="J5i-8T-phW"/>
<constraint firstItem="Uoo-hZ-D1f" firstAttribute="width" secondItem="S7L-mA-j3Y" secondAttribute="width" id="JU3-fd-6gz"/>
<constraint firstAttribute="trailing" relation="greaterThanOrEqual" secondItem="Pdq-s0-erT" secondAttribute="trailing" constant="20" id="K4l-zV-1mW"/>
<constraint firstItem="vJ5-JB-k1m" firstAttribute="width" secondItem="NhN-Lg-awX" secondAttribute="width" id="LT4-xB-E7u"/>
<constraint firstItem="86l-GG-SpO" firstAttribute="width" secondItem="DVM-Js-DwK" secondAttribute="width" id="MWE-ql-Ihv"/>
<constraint firstItem="tLh-V3-OfB" firstAttribute="leading" secondItem="bDo-OD-bck" secondAttribute="trailing" constant="8" id="NhO-8t-Aqz"/>
<constraint firstItem="zEH-aV-Tl7" firstAttribute="leading" secondItem="MGZ-hB-jhx" secondAttribute="leading" id="Nlo-A9-ESw"/>
<constraint firstItem="22k-mA-HyA" firstAttribute="top" secondItem="etc-K7-Atw" secondAttribute="bottom" constant="6" id="OTk-pM-SaL"/>
<constraint firstItem="DVM-Js-DwK" firstAttribute="top" secondItem="s2g-Iz-52P" secondAttribute="bottom" constant="16" id="PId-db-qoS"/>
<constraint firstItem="ZVm-yi-3cE" firstAttribute="width" secondItem="5rh-cM-iOg" secondAttribute="width" id="PZr-W4-6ok"/>
<constraint firstItem="08Q-2k-0Gb" firstAttribute="top" secondItem="Ce4-O7-Iu4" secondAttribute="bottom" constant="12" id="Psc-21-kax"/>
<constraint firstItem="s2g-Iz-52P" firstAttribute="leading" secondItem="2Hf-2V-95U" secondAttribute="trailing" constant="9" id="Sbo-ms-QTl"/>
<constraint firstAttribute="trailing" relation="greaterThanOrEqual" secondItem="DVM-Js-DwK" secondAttribute="trailing" constant="20" id="THN-Kq-Zh9"/>
<constraint firstItem="86l-GG-SpO" firstAttribute="leading" secondItem="vJ5-JB-k1m" secondAttribute="trailing" constant="5" id="TeG-3v-fcb"/>
<constraint firstItem="Uoo-hZ-D1f" firstAttribute="leading" secondItem="S7L-mA-j3Y" secondAttribute="leading" id="TjC-EV-4Xa"/>
@@ -536,6 +589,7 @@
<constraint firstItem="eTL-yP-QQ5" firstAttribute="baseline" secondItem="ZVm-yi-3cE" secondAttribute="baseline" id="cev-uP-NXR"/>
<constraint firstAttribute="trailing" relation="greaterThanOrEqual" secondItem="yI9-2a-q2a" secondAttribute="trailing" constant="20" id="d2E-dG-y9d"/>
<constraint firstItem="73q-gi-fe2" firstAttribute="baseline" secondItem="5rh-cM-iOg" secondAttribute="baseline" id="dQ5-0I-48F"/>
<constraint firstItem="s2g-Iz-52P" firstAttribute="baseline" secondItem="2Hf-2V-95U" secondAttribute="baseline" id="dUG-gL-yak"/>
<constraint firstAttribute="trailing" relation="greaterThanOrEqual" secondItem="etc-K7-Atw" secondAttribute="trailing" constant="20" id="dkQ-8f-2fd"/>
<constraint firstItem="08Q-2k-0Gb" firstAttribute="baseline" secondItem="Ns9-7q-hsh" secondAttribute="baseline" id="fG1-Oh-vZ3"/>
<constraint firstItem="TV6-Sk-Bqr" firstAttribute="leading" secondItem="ccd-Xn-Dj3" secondAttribute="leading" id="hnH-5m-uQi"/>
@@ -546,6 +600,7 @@
<constraint firstItem="BWL-Nn-iGH" firstAttribute="leading" secondItem="bDo-OD-bck" secondAttribute="leading" constant="10" id="jVz-7g-q3T"/>
<constraint firstAttribute="trailing" relation="greaterThanOrEqual" secondItem="Ce4-O7-Iu4" secondAttribute="trailing" constant="20" id="kcg-1f-F0u"/>
<constraint firstItem="bDo-OD-bck" firstAttribute="leading" secondItem="eTL-yP-QQ5" secondAttribute="leading" id="lFc-KN-zLO"/>
<constraint firstItem="Pdq-s0-erT" firstAttribute="leading" secondItem="etc-K7-Atw" secondAttribute="leading" id="ln6-S1-2dI"/>
<constraint firstItem="KWg-Ak-bB6" firstAttribute="width" secondItem="86l-GG-SpO" secondAttribute="width" id="ls4-Ue-l3L"/>
<constraint firstItem="ZZk-4j-Ji7" firstAttribute="leading" secondItem="swT-iM-shZ" secondAttribute="trailing" constant="9" id="mGV-1D-BO3"/>
<constraint firstItem="eTL-yP-QQ5" firstAttribute="leading" secondItem="9GN-f6-r2j" secondAttribute="leading" constant="12" id="mLZ-Ls-0tW"/>
@@ -553,6 +608,7 @@
<constraint firstItem="S7L-mA-j3Y" firstAttribute="leading" secondItem="UlG-O3-eNc" secondAttribute="leading" constant="20" id="n8G-nm-B24"/>
<constraint firstItem="yI9-2a-q2a" firstAttribute="leading" secondItem="MGZ-hB-jhx" secondAttribute="leading" id="nIF-EB-11c"/>
<constraint firstItem="22k-mA-HyA" firstAttribute="leading" secondItem="etc-K7-Atw" secondAttribute="leading" id="nJP-73-hpw"/>
<constraint firstItem="Pdq-s0-erT" firstAttribute="top" secondItem="ZZk-4j-Ji7" secondAttribute="bottom" constant="4" id="nve-cv-GjI"/>
<constraint firstAttribute="trailing" relation="greaterThanOrEqual" secondItem="ZZk-4j-Ji7" secondAttribute="trailing" constant="20" id="o5D-5D-f9z"/>
<constraint firstItem="MGZ-hB-jhx" firstAttribute="top" secondItem="KWg-Ak-bB6" secondAttribute="bottom" constant="23" id="ppd-vB-wtt"/>
<constraint firstItem="08Q-2k-0Gb" firstAttribute="leading" secondItem="Ns9-7q-hsh" secondAttribute="trailing" constant="8" id="pqo-4J-2VU"/>
@@ -561,6 +617,7 @@
<constraint firstItem="5rh-cM-iOg" firstAttribute="leading" secondItem="73q-gi-fe2" secondAttribute="trailing" constant="8" id="r5f-g8-Pns"/>
<constraint firstItem="eTL-yP-QQ5" firstAttribute="top" secondItem="9GN-f6-r2j" secondAttribute="bottom" constant="8" id="rfs-O9-wMC"/>
<constraint firstAttribute="trailing" relation="greaterThanOrEqual" secondItem="08Q-2k-0Gb" secondAttribute="trailing" constant="54" id="rwm-CD-0kE"/>
<constraint firstItem="2Hf-2V-95U" firstAttribute="leading" secondItem="Pdq-s0-erT" secondAttribute="leading" constant="22" id="scm-66-i3p"/>
<constraint firstItem="MGZ-hB-jhx" firstAttribute="baseline" secondItem="Uoo-hZ-D1f" secondAttribute="baseline" id="tXr-4J-GsO"/>
<constraint firstAttribute="trailing" relation="greaterThanOrEqual" secondItem="MGZ-hB-jhx" secondAttribute="trailing" constant="20" id="tZB-I8-Qao"/>
<constraint firstItem="5rh-cM-iOg" firstAttribute="width" secondItem="tLh-V3-OfB" secondAttribute="width" id="u3l-hm-QNJ"/>
@@ -569,7 +626,7 @@
<constraint firstItem="zEH-aV-Tl7" firstAttribute="top" secondItem="yI9-2a-q2a" secondAttribute="bottom" constant="6" id="yi7-mU-teZ"/>
<constraint firstAttribute="trailing" relation="greaterThanOrEqual" secondItem="ccd-Xn-Dj3" secondAttribute="trailing" constant="20" id="zrg-ax-2rw"/>
</constraints>
<point key="canvasLocation" x="91" y="-1"/>
<point key="canvasLocation" x="-161.5" y="-101.5"/>
</customView>
<arrayController objectClassName="Set" automaticallyPreparesContent="YES" id="vyv-na-Xpo" userLabel="Set Controller">
<declaredKeys>
+16
View File
@@ -79,4 +79,20 @@ typedef NS_ENUM(NSUInteger, SBQueueMetadataActionPreferredArtwork) {
- (instancetype)initWithLanguage:(NSString *)language;
@end
/**
* An actions that set the video track color space.
*/
typedef NS_ENUM(NSUInteger, SBQueueColorSpaceActionTag) {
SBQueueColorSpaceActionTagNone = 1,
SBQueueColorSpaceActionTagRec601PAL,
SBQueueColorSpaceActionTagRec601SMPTEC,
SBQueueColorSpaceActionTagRec709,
SBQueueColorSpaceActionTagRec2020
};
@interface SBQueueColorSpaceAction : NSObject <SBQueueActionProtocol>
- (instancetype)initWithTag:(uint16_t)tag;
- (instancetype)initWithColorPrimaries:(uint16_t)colorPrimaries transferCharacteristics:(uint16_t)transferCharacteristics matrixCoefficients:(uint16_t)matrixCoefficients;
@end
NS_ASSUME_NONNULL_END
+98
View File
@@ -473,3 +473,101 @@
@end
@interface SBQueueColorSpaceAction ()
@property(nonatomic, readonly) uint16_t colorPrimaries;
@property(nonatomic, readonly) uint16_t transferCharacteristics;
@property(nonatomic, readonly) uint16_t matrixCoefficients;
@end
@implementation SBQueueColorSpaceAction
- (instancetype)initWithTag:(uint16_t)tag {
self = [super init];
if (self) {
switch (tag) {
case SBQueueColorSpaceActionTagRec601PAL:
_colorPrimaries = 5;
_transferCharacteristics = 1;
_matrixCoefficients = 6;
break;
case SBQueueColorSpaceActionTagRec601SMPTEC:
_colorPrimaries = 6;
_transferCharacteristics = 1;
_matrixCoefficients = 6;
break;
case SBQueueColorSpaceActionTagRec709:
_colorPrimaries = 1;
_transferCharacteristics = 1;
_matrixCoefficients = 1;
break;
case SBQueueColorSpaceActionTagRec2020:
_colorPrimaries = 9;
_transferCharacteristics = 1;
_matrixCoefficients = 9;
break;
case SBQueueColorSpaceActionTagNone:
default:
_colorPrimaries = 0;
_transferCharacteristics = 0;
_matrixCoefficients = 0;
break;
}
}
return self;
}
- (instancetype)initWithColorPrimaries:(uint16_t)colorPrimaries transferCharacteristics:(uint16_t)transferCharacteristics matrixCoefficients:(uint16_t)matrixCoefficients {
self = [super init];
if (self) {
_colorPrimaries = colorPrimaries;
_transferCharacteristics = transferCharacteristics;
_matrixCoefficients = matrixCoefficients;
}
return self;
}
- (void)runAction:(SBQueueItem *)item {
for (MP42VideoTrack *track in [item.mp4File tracksWithMediaType:kMP42MediaType_Video]) {
if (track.format == kMP42VideoCodecType_H264 ||
track.format == kMP42VideoCodecType_HEVC ||
track.format == kMP42VideoCodecType_HEVC_2 ||
track.format == kMP42VideoCodecType_MPEG4Video) {
track.colorPrimaries = self.colorPrimaries;
track.transferCharacteristics = self.transferCharacteristics;
track.matrixCoefficients = self.matrixCoefficients;
}
}
}
- (NSString *)description {
return NSLocalizedString(@"Set color space.", @"Set track color space action description");
}
- (NSString *)localizedDescription {
return NSLocalizedString(@"Setting color space", @"Set track color space action local description");
}
+ (BOOL)supportsSecureCoding {
return YES;
}
- (instancetype)initWithCoder:(NSCoder *)coder {
self = [super init];
_colorPrimaries = [coder decodeInt32ForKey:@"SBQueueColorSpaceActionColorPrimaries"];
_transferCharacteristics = [coder decodeInt32ForKey:@"SBQueueColorSpaceActionTransferCharacteristics"];
_matrixCoefficients = [coder decodeInt32ForKey:@"SBQueueColorSpaceActionMatrixCoefficients"];
return self;
}
- (void)encodeWithCoder:(NSCoder *)coder {
[coder encodeInt32:self.colorPrimaries forKey:@"SBQueueColorSpaceActionColorPrimaries"];
[coder encodeInt32:self.transferCharacteristics forKey:@"SBQueueColorSpaceActionTransferCharacteristics"];
[coder encodeInt32:self.matrixCoefficients forKey:@"SBQueueColorSpaceActionMatrixCoefficients"];
}
@end
+4
View File
@@ -283,6 +283,10 @@ static void *SBQueueContex = &SBQueueContex;
[item addAction:[[SBQueueSetLanguageAction alloc] initWithLanguage:self.options[SBQueueFixTrackLanguageValue]]];
}
if ([(self.options)[SBQueueApplyColorSpace] boolValue]) {
[item addAction:[[SBQueueColorSpaceAction alloc] initWithTag:[self.options[SBQueueApplyColorSpaceValue] unsignedIntegerValue]]];
}
if ((self.options)[SBQueueSet]) {
[item addAction:[[SBQueueSetAction alloc] initWithSet:(self.options)[SBQueueSet]]];
}
+7 -4
View File
@@ -360,9 +360,11 @@ bail:
// Convert from a file reference url to a normal url
// the file will be replaced if optimized, and the reference url
// may point to nil
[self willChangeValueForKey:@"fileURL"];
_fileURL = filePathURL;
[self didChangeValueForKey:@"fileURL"];
dispatch_sync(dispatch_get_main_queue(), ^{
[self willChangeValueForKey:@"fileURL"];
self->_fileURL = filePathURL;
[self didChangeValueForKey:@"fileURL"];
});
#ifdef SB_SANDBOX
if ([destination respondsToSelector:@selector(stopAccessingSecurityScopedResource)])
@@ -410,7 +412,8 @@ bail:
_actionsInternal = [decoder decodeObjectOfClasses:[NSSet setWithObjects:[NSMutableArray class], [SBQueueSetAction class],
[SBQueueMetadataAction class], [SBQueueSubtitlesAction class],
[SBQueueSetLanguageAction class], [SBQueueFixFallbacksAction class],
[SBQueueClearTrackNameAction class], [SBQueueOrganizeGroupsAction class], nil]
[SBQueueClearTrackNameAction class], [SBQueueOrganizeGroupsAction class],
[SBQueueColorSpaceAction class], nil]
forKey:@"SBQueueItemActions"];
_status = [decoder decodeIntForKey:@"SBQueueItemStatus"];
+3
View File
@@ -25,6 +25,9 @@ extern NSString * const SBQueueShowDoneNotification;
extern NSString * const SBQueueFixTrackLanguage;
extern NSString * const SBQueueFixTrackLanguageValue;
extern NSString * const SBQueueApplyColorSpace;
extern NSString * const SBQueueApplyColorSpaceValue;
extern NSString * const SBQueueMovieProvider;
extern NSString * const SBQueueTVShowProvider;
extern NSString * const SBQueueMovieProviderLanguage;
+8 -2
View File
@@ -25,6 +25,9 @@ NSString * const SBQueueShowDoneNotification = @"SBQueueShowDoneNotification";
NSString * const SBQueueFixTrackLanguage = @"SBQueueFixTrackLanguage";
NSString * const SBQueueFixTrackLanguageValue = @"SBQueueFixTrackLanguageValue";
NSString * const SBQueueApplyColorSpace = @"SBQueueApplyColorSpace";
NSString * const SBQueueApplyColorSpaceValue = @"SBQueueApplyColorSpaceValue";
NSString * const SBQueueDestination = @"SBQueueDestination";
NSString * const SBQueueMovieProvider = @"SBQueueMovieProvider";
@@ -42,7 +45,7 @@ NSString * const SBQueueSet = @"SBQueueSet";
if (self) {
_options = [[NSMutableDictionary alloc] init];
NSArray *keys = @[SBQueueFileType, SBQueueOrganize, SBQueueFixTrackLanguage, SBQueueFixTrackLanguageValue, SBQueueFixFallbacks, SBQueueClearTrackName, SBQueueMetadata, SBQueueSubtitles, SBQueueAutoStart, SBQueueOptimize, SBQueueShowDoneNotification, SBQueueMovieProvider, SBQueueTVShowProvider, SBQueueMovieProviderLanguage, SBQueueTVShowProviderLanguage, SBQueueProviderArtwork];
NSArray *keys = @[SBQueueFileType, SBQueueOrganize, SBQueueFixTrackLanguage, SBQueueFixTrackLanguageValue, SBQueueApplyColorSpace, SBQueueApplyColorSpaceValue, SBQueueFixFallbacks, SBQueueClearTrackName, SBQueueMetadata, SBQueueSubtitles, SBQueueAutoStart, SBQueueOptimize, SBQueueShowDoneNotification, SBQueueMovieProvider, SBQueueTVShowProvider, SBQueueMovieProviderLanguage, SBQueueTVShowProviderLanguage, SBQueueProviderArtwork];
[keys enumerateObjectsUsingBlock:^(id obj, NSUInteger idx, BOOL *stop) {
self.options[obj] = [[NSUserDefaults standardUserDefaults] valueForKey:obj];
@@ -73,6 +76,9 @@ NSString * const SBQueueSet = @"SBQueueSet";
SBQueueMetadata : @NO,
SBQueueSubtitles: @YES,
SBQueueApplyColorSpace: @NO,
SBQueueApplyColorSpaceValue: @1,
SBQueueAutoStart: @NO,
SBQueueOptimize : @YES,
SBQueueShowDoneNotification: @YES,
@@ -88,7 +94,7 @@ NSString * const SBQueueSet = @"SBQueueSet";
* Save the queue user defaults
*/
- (void)saveUserDefaults {
NSArray<NSString *> *keys = @[SBQueueFileType, SBQueueOrganize, SBQueueFixTrackLanguage, SBQueueFixTrackLanguageValue, SBQueueFixFallbacks, SBQueueClearTrackName, SBQueueMetadata, SBQueueSubtitles, SBQueueAutoStart, SBQueueShowDoneNotification, SBQueueOptimize, SBQueueMovieProvider, SBQueueTVShowProvider, SBQueueMovieProviderLanguage, SBQueueTVShowProviderLanguage, SBQueueProviderArtwork];
NSArray<NSString *> *keys = @[SBQueueFileType, SBQueueOrganize, SBQueueFixTrackLanguage, SBQueueFixTrackLanguageValue, SBQueueApplyColorSpace, SBQueueApplyColorSpaceValue, SBQueueFixFallbacks, SBQueueClearTrackName, SBQueueMetadata, SBQueueSubtitles, SBQueueAutoStart, SBQueueShowDoneNotification, SBQueueOptimize, SBQueueMovieProvider, SBQueueTVShowProvider, SBQueueMovieProviderLanguage, SBQueueTVShowProviderLanguage, SBQueueProviderArtwork];
[keys enumerateObjectsUsingBlock:^(id obj, NSUInteger idx, BOOL *stop) {
[[NSUserDefaults standardUserDefaults] setValue:(self.options)[obj] forKey:obj];