libhb: ui: add Opus passthru. Enable Opus in MP4. (#4393)
* libhb: ui: add Opus passthru. Enable Opus in MP4.
This commit is contained in:
parent
bbf5101738
commit
91622cb27d
@ -338,6 +338,10 @@ int ghb_get_copy_mask(GhbValue *settings)
|
||||
{
|
||||
mask |= HB_ACODEC_TRUEHD_PASS;
|
||||
}
|
||||
if (ghb_dict_get_bool(settings, "AudioAllowOPUSPass"))
|
||||
{
|
||||
mask |= HB_ACODEC_OPUS_PASS;
|
||||
}
|
||||
return mask;
|
||||
}
|
||||
|
||||
|
@ -6278,6 +6278,27 @@ This permits AAC passthru to be selected when automatic passthru selection is en
|
||||
<property name="height">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkCheckButton" id="AudioAllowOPUSPass">
|
||||
<property name="label" translatable="yes">Opus</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">False</property>
|
||||
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
|
||||
<property name="tooltip_text" translatable="yes">Enable this if your playback device supports Opus.
|
||||
This permits Opus passthru to be selected when automatic passthru selection is enabled.</property>
|
||||
<property name="halign">start</property>
|
||||
<property name="active">True</property>
|
||||
<property name="draw_indicator">True</property>
|
||||
<signal name="toggled" handler="audio_passthru_widget_changed_cb" swapped="no"/>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">2</property>
|
||||
<property name="top_attach">4</property>
|
||||
<property name="width">1</property>
|
||||
<property name="height">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="position">0</property>
|
||||
|
@ -18,6 +18,7 @@
|
||||
"AudioAllowEAC3Pass": false,
|
||||
"AudioAllowFLACPass": false,
|
||||
"AudioAllowTRUEHDPass": false,
|
||||
"AudioAllowOPUSPass": false,
|
||||
"AudioBitrate": "192",
|
||||
"AudioEncoder": "copy:ac3",
|
||||
"AudioTrack": 0,
|
||||
|
@ -468,6 +468,10 @@ ghb_preset_to_settings(GhbValue *settings, GhbValue *preset)
|
||||
case HB_ACODEC_TRUEHD_PASS:
|
||||
ghb_dict_set_bool(settings, "AudioAllowTRUEHDPass", 1);
|
||||
break;
|
||||
case HB_ACODEC_OPUS:
|
||||
case HB_ACODEC_OPUS_PASS:
|
||||
ghb_dict_set_bool(settings, "AudioAllowOPUSPass", 1);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1696,6 +1700,10 @@ GhbValue* ghb_create_copy_mask(GhbValue *settings)
|
||||
{
|
||||
ghb_array_append(copy_mask, ghb_string_value_new("copy:truehd"));
|
||||
}
|
||||
if (ghb_dict_get_bool(settings, "AudioAllowOPUSPass"))
|
||||
{
|
||||
ghb_array_append(copy_mask, ghb_string_value_new("copy:opus"));
|
||||
}
|
||||
return copy_mask;
|
||||
}
|
||||
|
||||
|
@ -92,6 +92,7 @@ enum
|
||||
HB_GID_ACODEC_TRUEHD_PASS,
|
||||
HB_GID_ACODEC_VORBIS,
|
||||
HB_GID_ACODEC_OPUS,
|
||||
HB_GID_ACODEC_OPUS_PASS,
|
||||
HB_GID_MUX_MKV,
|
||||
HB_GID_MUX_MP4,
|
||||
HB_GID_MUX_WEBM,
|
||||
@ -417,7 +418,8 @@ hb_encoder_internal_t hb_audio_encoders[] =
|
||||
{ { "FLAC 16-bit", "flac16", "FLAC 16-bit (libavcodec)", HB_ACODEC_FFFLAC, HB_MUX_MASK_MKV, }, NULL, 0, 1, HB_GID_ACODEC_FLAC, },
|
||||
{ { "FLAC 24-bit", "flac24", "FLAC 24-bit (libavcodec)", HB_ACODEC_FFFLAC24, HB_MUX_MASK_MKV, }, NULL, 0, 1, HB_GID_ACODEC_FLAC, },
|
||||
{ { "FLAC Passthru", "copy:flac", "FLAC Passthru", HB_ACODEC_FLAC_PASS, HB_MUX_MASK_MKV, }, NULL, 0, 1, HB_GID_ACODEC_FLAC_PASS, },
|
||||
{ { "Opus", "opus", "Opus (libopus)", HB_ACODEC_OPUS, HB_MUX_MASK_WEBM|HB_MUX_MASK_MKV, }, NULL, 0, 1, HB_GID_ACODEC_OPUS, },
|
||||
{ { "Opus", "opus", "Opus (libopus)", HB_ACODEC_OPUS, HB_MUX_MASK_MP4|HB_MUX_MASK_WEBM|HB_MUX_MASK_MKV, }, NULL, 0, 1, HB_GID_ACODEC_OPUS, },
|
||||
{ { "Opus Passthru", "copy:opus", "Opus Passthru", HB_ACODEC_OPUS_PASS, HB_MUX_MASK_MP4|HB_MUX_MASK_WEBM|HB_MUX_MASK_MKV, }, NULL, 0, 1, HB_GID_ACODEC_OPUS_PASS, },
|
||||
{ { "Auto Passthru", "copy", "Auto Passthru", HB_ACODEC_AUTO_PASS, HB_MUX_MASK_MP4|HB_MUX_MASK_MKV, }, NULL, 0, 1, HB_GID_ACODEC_AUTO_PASS, },
|
||||
};
|
||||
int hb_audio_encoders_count = sizeof(hb_audio_encoders) / sizeof(hb_audio_encoders[0]);
|
||||
|
@ -833,7 +833,7 @@ struct hb_job_s
|
||||
#define HB_ACODEC_OPUS 0x04000000
|
||||
#define HB_ACODEC_FF_MASK 0x0FFF2800
|
||||
#define HB_ACODEC_PASS_FLAG 0x40000000
|
||||
#define HB_ACODEC_PASS_MASK (HB_ACODEC_AC3 | HB_ACODEC_DCA | HB_ACODEC_DCA_HD | HB_ACODEC_FFAAC | HB_ACODEC_FFEAC3 | HB_ACODEC_FFFLAC | HB_ACODEC_MP2 | HB_ACODEC_MP3 | HB_ACODEC_FFTRUEHD)
|
||||
#define HB_ACODEC_PASS_MASK (HB_ACODEC_AC3 | HB_ACODEC_DCA | HB_ACODEC_DCA_HD | HB_ACODEC_FFAAC | HB_ACODEC_FFEAC3 | HB_ACODEC_FFFLAC | HB_ACODEC_MP2 | HB_ACODEC_MP3 | HB_ACODEC_FFTRUEHD | HB_ACODEC_OPUS)
|
||||
#define HB_ACODEC_AUTO_PASS (HB_ACODEC_PASS_FLAG | HB_ACODEC_PASS_MASK)
|
||||
#define HB_ACODEC_ANY (HB_ACODEC_PASS_FLAG | HB_ACODEC_MASK)
|
||||
#define HB_ACODEC_AAC_PASS (HB_ACODEC_PASS_FLAG | HB_ACODEC_FFAAC)
|
||||
@ -845,6 +845,7 @@ struct hb_job_s
|
||||
#define HB_ACODEC_MP2_PASS (HB_ACODEC_PASS_FLAG | HB_ACODEC_MP2)
|
||||
#define HB_ACODEC_MP3_PASS (HB_ACODEC_PASS_FLAG | HB_ACODEC_MP3)
|
||||
#define HB_ACODEC_TRUEHD_PASS (HB_ACODEC_PASS_FLAG | HB_ACODEC_FFTRUEHD)
|
||||
#define HB_ACODEC_OPUS_PASS (HB_ACODEC_PASS_FLAG | HB_ACODEC_OPUS)
|
||||
|
||||
#define HB_SUBSTREAM_BD_TRUEHD 0x72
|
||||
#define HB_SUBSTREAM_BD_AC3 0x76
|
||||
|
@ -3361,6 +3361,8 @@ static void import_audio_0_0_0(hb_value_t *preset)
|
||||
hb_value_array_append(copy, hb_value_string("copy:mp3"));
|
||||
if (hb_value_get_bool(hb_dict_get(preset, "AudioAllowAACPass")))
|
||||
hb_value_array_append(copy, hb_value_string("copy:aac"));
|
||||
if (hb_value_get_bool(hb_dict_get(preset, "AudioAllowOPUSPass")))
|
||||
hb_value_array_append(copy, hb_value_string("copy:opus"));
|
||||
if (hb_value_get_bool(hb_dict_get(preset, "AudioAllowAC3Pass")))
|
||||
hb_value_array_append(copy, hb_value_string("copy:ac3"));
|
||||
if (hb_value_get_bool(hb_dict_get(preset, "AudioAllowDTSPass")))
|
||||
|
@ -5440,6 +5440,14 @@ static void add_ffmpeg_audio(hb_title_t *title, hb_stream_t *stream, int id)
|
||||
audio->config.in.codec = HB_ACODEC_MP3;
|
||||
break;
|
||||
|
||||
case AV_CODEC_ID_OPUS:
|
||||
{
|
||||
int len = MIN(codecpar->extradata_size, HB_CONFIG_MAX_SIZE);
|
||||
memcpy(audio->priv.config.extradata.bytes, codecpar->extradata, len);
|
||||
audio->priv.config.extradata.length = len;
|
||||
audio->config.in.codec = HB_ACODEC_OPUS;
|
||||
} break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
@ -1,8 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="17506" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
|
||||
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="20037" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
|
||||
<dependencies>
|
||||
<deployment identifier="macosx"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="17506"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="20037"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
@ -19,7 +19,7 @@
|
||||
<windowStyleMask key="styleMask" titled="YES" closable="YES" miniaturizable="YES" resizable="YES"/>
|
||||
<windowPositionMask key="initialPositionMask" leftStrut="YES" rightStrut="YES" topStrut="YES" bottomStrut="YES"/>
|
||||
<rect key="contentRect" x="54" y="544" width="800" height="474"/>
|
||||
<rect key="screenRect" x="0.0" y="0.0" width="1920" height="1055"/>
|
||||
<rect key="screenRect" x="0.0" y="0.0" width="1440" height="875"/>
|
||||
<view key="contentView" id="ZP2-Cp-K5w">
|
||||
<rect key="frame" x="0.0" y="0.0" width="823" height="474"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
@ -39,10 +39,10 @@ DQ
|
||||
</connections>
|
||||
</button>
|
||||
<stackView distribution="fill" orientation="vertical" alignment="leading" horizontalStackHuggingPriority="249.99998474121094" verticalStackHuggingPriority="249.99998474121094" detachesHiddenViews="YES" translatesAutoresizingMaskIntoConstraints="NO" id="8Pw-Kq-eMN">
|
||||
<rect key="frame" x="507" y="312" width="234" height="118"/>
|
||||
<rect key="frame" x="516" y="312" width="222" height="118"/>
|
||||
<subviews>
|
||||
<stackView distribution="fill" orientation="horizontal" alignment="top" horizontalStackHuggingPriority="249.99998474121094" verticalStackHuggingPriority="249.99998474121094" detachesHiddenViews="YES" translatesAutoresizingMaskIntoConstraints="NO" id="OkV-lt-k7P">
|
||||
<rect key="frame" x="0.0" y="24" width="234" height="94"/>
|
||||
<rect key="frame" x="0.0" y="24" width="222" height="94"/>
|
||||
<subviews>
|
||||
<textField horizontalHuggingPriority="249" verticalHuggingPriority="750" horizontalCompressionResistancePriority="1000" allowsCharacterPickerTouchBarItem="YES" preferredMaxLayoutWidth="300" translatesAutoresizingMaskIntoConstraints="NO" id="l4i-pd-Cbk">
|
||||
<rect key="frame" x="-2" y="80" width="100" height="14"/>
|
||||
@ -53,22 +53,22 @@ DQ
|
||||
</textFieldCell>
|
||||
</textField>
|
||||
<stackView distribution="fill" orientation="horizontal" alignment="top" spacing="6" horizontalStackHuggingPriority="249.99998474121094" verticalStackHuggingPriority="249.99998474121094" detachesHiddenViews="YES" translatesAutoresizingMaskIntoConstraints="NO" id="WFJ-He-GIV">
|
||||
<rect key="frame" x="104" y="0.0" width="130" height="94"/>
|
||||
<rect key="frame" x="104" y="0.0" width="118" height="94"/>
|
||||
<subviews>
|
||||
<stackView distribution="fill" orientation="vertical" alignment="leading" spacing="6" horizontalStackHuggingPriority="249.99998474121094" verticalStackHuggingPriority="249.99998474121094" detachesHiddenViews="YES" translatesAutoresizingMaskIntoConstraints="NO" id="55H-sv-jYf">
|
||||
<rect key="frame" x="0.0" y="0.0" width="64" height="94"/>
|
||||
<rect key="frame" x="0.0" y="0.0" width="48" height="94"/>
|
||||
<subviews>
|
||||
<button translatesAutoresizingMaskIntoConstraints="NO" id="vUx-OV-W5T">
|
||||
<button translatesAutoresizingMaskIntoConstraints="NO" id="GHJ-25-kZl">
|
||||
<rect key="frame" x="-1" y="79" width="45" height="16"/>
|
||||
<string key="toolTip">Enable this if your playback device supports MP3. This permits MP3 passthru to be selected when automatic passthru selecion is enabled.</string>
|
||||
<buttonCell key="cell" type="check" title="MP3" bezelStyle="regularSquare" imagePosition="left" alignment="left" controlSize="small" state="on" inset="2" id="sdZ-Rx-JoG">
|
||||
<string key="toolTip">Enable this if your playback device supports MP2. This permits MP2 passthru to be selected when automatic passthru selecion is enabled.</string>
|
||||
<buttonCell key="cell" type="check" title="MP2" bezelStyle="regularSquare" imagePosition="left" alignment="left" controlSize="small" state="on" inset="2" id="Z8O-AS-UdA">
|
||||
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
|
||||
<font key="font" metaFont="menu" size="11"/>
|
||||
</buttonCell>
|
||||
<connections>
|
||||
<accessibilityConnection property="title" destination="l4i-pd-Cbk" id="Fj1-2v-43m"/>
|
||||
<binding destination="-2" name="value" keyPath="self.settings.allowMP3Passthru" id="rVF-G7-BYA"/>
|
||||
<outlet property="nextKeyView" destination="fzd-MO-xaB" id="1fb-a1-B25"/>
|
||||
<accessibilityConnection property="title" destination="l4i-pd-Cbk" id="i2Z-jt-9Zf"/>
|
||||
<binding destination="-2" name="value" keyPath="self.settings.allowMP2Passthru" id="tWz-Ef-iMQ"/>
|
||||
<outlet property="nextKeyView" destination="LdN-Cx-ZJY" id="PRg-PI-p5Z"/>
|
||||
</connections>
|
||||
</button>
|
||||
<button translatesAutoresizingMaskIntoConstraints="NO" id="fzd-MO-xaB">
|
||||
@ -98,7 +98,7 @@ DQ
|
||||
</connections>
|
||||
</button>
|
||||
<button horizontalHuggingPriority="249" translatesAutoresizingMaskIntoConstraints="NO" id="E93-Md-aWa">
|
||||
<rect key="frame" x="-1" y="19" width="65" height="16"/>
|
||||
<rect key="frame" x="-1" y="19" width="49" height="16"/>
|
||||
<string key="toolTip">Enable this if your playback device supports DTS. This permits DTS passthru to be selected when automatic passthru selecion is enabled.</string>
|
||||
<buttonCell key="cell" type="check" title="DTS" bezelStyle="regularSquare" imagePosition="left" alignment="left" controlSize="small" state="on" inset="2" id="8mC-Wx-myL">
|
||||
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
|
||||
@ -110,17 +110,17 @@ DQ
|
||||
<outlet property="nextKeyView" destination="IxI-o9-jMs" id="sBB-lF-vtE"/>
|
||||
</connections>
|
||||
</button>
|
||||
<button horizontalHuggingPriority="249" translatesAutoresizingMaskIntoConstraints="NO" id="IxI-o9-jMs">
|
||||
<rect key="frame" x="-1" y="-1" width="65" height="16"/>
|
||||
<string key="toolTip">Enable this if your playback device supports DTS-HD. This permits DTS-HD passthru to be selected when automatic passthru selecion is enabled.</string>
|
||||
<buttonCell key="cell" type="check" title="DTS-HD" bezelStyle="regularSquare" imagePosition="left" alignment="left" controlSize="small" state="on" inset="2" id="LX6-kc-5vq">
|
||||
<button translatesAutoresizingMaskIntoConstraints="NO" id="0HY-xB-cvO">
|
||||
<rect key="frame" x="-1" y="-1" width="49" height="16"/>
|
||||
<string key="toolTip">Enable this if your playback device supports FLAC. This permits FLAC passthru to be selected when automatic passthru selecion is enabled.</string>
|
||||
<buttonCell key="cell" type="check" title="FLAC" bezelStyle="regularSquare" imagePosition="left" alignment="left" controlSize="small" state="on" inset="2" id="naS-No-CdV">
|
||||
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
|
||||
<font key="font" metaFont="menu" size="11"/>
|
||||
</buttonCell>
|
||||
<connections>
|
||||
<accessibilityConnection property="title" destination="l4i-pd-Cbk" id="S8M-P1-c2B"/>
|
||||
<binding destination="-2" name="value" keyPath="self.settings.allowDTSHDPassthru" id="w77-9v-vIh"/>
|
||||
<outlet property="nextKeyView" destination="LdN-Cx-ZJY" id="rAA-cB-Ma5"/>
|
||||
<accessibilityConnection property="title" destination="l4i-pd-Cbk" id="SFz-OO-EgN"/>
|
||||
<binding destination="-2" name="value" keyPath="self.settings.allowFLACPassthru" id="wCD-CW-AEP"/>
|
||||
<outlet property="nextKeyView" destination="BK7-c4-kkk" id="Pt4-9c-oQl"/>
|
||||
</connections>
|
||||
</button>
|
||||
</subviews>
|
||||
@ -140,36 +140,37 @@ DQ
|
||||
</customSpacing>
|
||||
</stackView>
|
||||
<stackView distribution="fill" orientation="vertical" alignment="leading" spacing="6" horizontalStackHuggingPriority="249.99998474121094" verticalStackHuggingPriority="249.99998474121094" detachesHiddenViews="YES" translatesAutoresizingMaskIntoConstraints="NO" id="hmB-iB-sbe">
|
||||
<rect key="frame" x="70" y="20" width="60" height="74"/>
|
||||
<rect key="frame" x="54" y="0.0" width="64" height="94"/>
|
||||
<subviews>
|
||||
<button translatesAutoresizingMaskIntoConstraints="NO" id="os0-Jl-OXF">
|
||||
<rect key="frame" x="-1" y="59" width="61" height="16"/>
|
||||
<string key="toolTip">Enable this if your playback device supports TrueHD. This permits TrueHD passthru to be selected when automatic passthru selecion is enabled.</string>
|
||||
<buttonCell key="cell" type="check" title="TrueHD" bezelStyle="regularSquare" imagePosition="left" alignment="left" controlSize="small" state="on" inset="2" id="z9d-P3-6UP">
|
||||
<button translatesAutoresizingMaskIntoConstraints="NO" id="vUx-OV-W5T">
|
||||
<rect key="frame" x="-1" y="79" width="45" height="16"/>
|
||||
<string key="toolTip">Enable this if your playback device supports MP3. This permits MP3 passthru to be selected when automatic passthru selecion is enabled.</string>
|
||||
<buttonCell key="cell" type="check" title="MP3" bezelStyle="regularSquare" imagePosition="left" alignment="left" controlSize="small" state="on" inset="2" id="sdZ-Rx-JoG">
|
||||
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
|
||||
<font key="font" metaFont="menu" size="11"/>
|
||||
</buttonCell>
|
||||
<connections>
|
||||
<accessibilityConnection property="title" destination="l4i-pd-Cbk" id="tU2-ar-p5a"/>
|
||||
<binding destination="-2" name="value" keyPath="self.settings.allowTrueHDPassthru" id="3fh-cT-PtB"/>
|
||||
<outlet property="nextKeyView" destination="0HY-xB-cvO" id="TYi-8L-gT4"/>
|
||||
<accessibilityConnection property="title" destination="l4i-pd-Cbk" id="Fj1-2v-43m"/>
|
||||
<binding destination="-2" name="value" keyPath="self.settings.allowMP3Passthru" id="rVF-G7-BYA"/>
|
||||
<outlet property="nextKeyView" destination="fzd-MO-xaB" id="1fb-a1-B25"/>
|
||||
</connections>
|
||||
</button>
|
||||
<button translatesAutoresizingMaskIntoConstraints="NO" id="0HY-xB-cvO">
|
||||
<rect key="frame" x="-1" y="39" width="49" height="16"/>
|
||||
<string key="toolTip">Enable this if your playback device supports FLAC. This permits FLAC passthru to be selected when automatic passthru selecion is enabled.</string>
|
||||
<buttonCell key="cell" type="check" title="FLAC" bezelStyle="regularSquare" imagePosition="left" alignment="left" controlSize="small" state="on" inset="2" id="naS-No-CdV">
|
||||
<button id="Ry1-gA-ns4" userLabel="Opus">
|
||||
<rect key="frame" x="-1" y="59" width="49" height="16"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
||||
<string key="toolTip">Enable this if your playback device supports Opus. This permits Opus passthru to be selected when automatic passthru selecion is enabled.</string>
|
||||
<buttonCell key="cell" type="check" title="Opus" bezelStyle="regularSquare" imagePosition="left" alignment="left" controlSize="small" state="on" inset="2" id="wAh-LS-JzG">
|
||||
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
|
||||
<font key="font" metaFont="menu" size="11"/>
|
||||
</buttonCell>
|
||||
<connections>
|
||||
<accessibilityConnection property="title" destination="l4i-pd-Cbk" id="SFz-OO-EgN"/>
|
||||
<binding destination="-2" name="value" keyPath="self.settings.allowFLACPassthru" id="wCD-CW-AEP"/>
|
||||
<outlet property="nextKeyView" destination="BK7-c4-kkk" id="Pt4-9c-oQl"/>
|
||||
<accessibilityConnection property="title" destination="l4i-pd-Cbk" id="flW-1H-v0A"/>
|
||||
<binding destination="-2" name="value" keyPath="self.settings.allowOpusPassthru" id="mQQ-ye-4nR"/>
|
||||
<outlet property="nextKeyView" destination="0HY-xB-cvO" id="MiM-4b-a47"/>
|
||||
</connections>
|
||||
</button>
|
||||
<button translatesAutoresizingMaskIntoConstraints="NO" id="BK7-c4-kkk">
|
||||
<rect key="frame" x="-1" y="19" width="55" height="16"/>
|
||||
<rect key="frame" x="-1" y="39" width="55" height="16"/>
|
||||
<string key="toolTip">Enable this if your playback device supports E-AC3. This permits E-AC3 passthru to be selected when automatic passthru selecion is enabled.</string>
|
||||
<buttonCell key="cell" type="check" title="E-AC3" bezelStyle="regularSquare" imagePosition="left" alignment="left" controlSize="small" state="on" inset="2" id="u9h-dn-wcK">
|
||||
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
|
||||
@ -181,17 +182,30 @@ DQ
|
||||
<outlet property="nextKeyView" destination="LdN-Cx-ZJY" id="scB-D1-Zvp"/>
|
||||
</connections>
|
||||
</button>
|
||||
<button translatesAutoresizingMaskIntoConstraints="NO" id="GHJ-25-kZl">
|
||||
<rect key="frame" x="-1" y="-1" width="45" height="16"/>
|
||||
<string key="toolTip">Enable this if your playback device supports MP2. This permits MP2 passthru to be selected when automatic passthru selecion is enabled.</string>
|
||||
<buttonCell key="cell" type="check" title="MP2" bezelStyle="regularSquare" imagePosition="left" alignment="left" controlSize="small" state="on" inset="2" id="Z8O-AS-UdA">
|
||||
<button horizontalHuggingPriority="249" translatesAutoresizingMaskIntoConstraints="NO" id="IxI-o9-jMs">
|
||||
<rect key="frame" x="-1" y="19" width="65" height="16"/>
|
||||
<string key="toolTip">Enable this if your playback device supports DTS-HD. This permits DTS-HD passthru to be selected when automatic passthru selecion is enabled.</string>
|
||||
<buttonCell key="cell" type="check" title="DTS-HD" bezelStyle="regularSquare" imagePosition="left" alignment="left" controlSize="small" state="on" inset="2" id="LX6-kc-5vq">
|
||||
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
|
||||
<font key="font" metaFont="menu" size="11"/>
|
||||
</buttonCell>
|
||||
<connections>
|
||||
<accessibilityConnection property="title" destination="l4i-pd-Cbk" id="i2Z-jt-9Zf"/>
|
||||
<binding destination="-2" name="value" keyPath="self.settings.allowMP2Passthru" id="tWz-Ef-iMQ"/>
|
||||
<outlet property="nextKeyView" destination="LdN-Cx-ZJY" id="PRg-PI-p5Z"/>
|
||||
<accessibilityConnection property="title" destination="l4i-pd-Cbk" id="S8M-P1-c2B"/>
|
||||
<binding destination="-2" name="value" keyPath="self.settings.allowDTSHDPassthru" id="w77-9v-vIh"/>
|
||||
<outlet property="nextKeyView" destination="LdN-Cx-ZJY" id="rAA-cB-Ma5"/>
|
||||
</connections>
|
||||
</button>
|
||||
<button translatesAutoresizingMaskIntoConstraints="NO" id="os0-Jl-OXF">
|
||||
<rect key="frame" x="-1" y="-1" width="61" height="16"/>
|
||||
<string key="toolTip">Enable this if your playback device supports TrueHD. This permits TrueHD passthru to be selected when automatic passthru selecion is enabled.</string>
|
||||
<buttonCell key="cell" type="check" title="TrueHD" bezelStyle="regularSquare" imagePosition="left" alignment="left" controlSize="small" state="on" inset="2" id="z9d-P3-6UP">
|
||||
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
|
||||
<font key="font" metaFont="menu" size="11"/>
|
||||
</buttonCell>
|
||||
<connections>
|
||||
<accessibilityConnection property="title" destination="l4i-pd-Cbk" id="tU2-ar-p5a"/>
|
||||
<binding destination="-2" name="value" keyPath="self.settings.allowTrueHDPassthru" id="3fh-cT-PtB"/>
|
||||
<outlet property="nextKeyView" destination="0HY-xB-cvO" id="TYi-8L-gT4"/>
|
||||
</connections>
|
||||
</button>
|
||||
</subviews>
|
||||
@ -200,12 +214,14 @@ DQ
|
||||
<integer value="1000"/>
|
||||
<integer value="1000"/>
|
||||
<integer value="1000"/>
|
||||
<integer value="1000"/>
|
||||
</visibilityPriorities>
|
||||
<customSpacing>
|
||||
<real value="3.4028234663852886e+38"/>
|
||||
<real value="3.4028234663852886e+38"/>
|
||||
<real value="3.4028234663852886e+38"/>
|
||||
<real value="3.4028234663852886e+38"/>
|
||||
<real value="3.4028234663852886e+38"/>
|
||||
</customSpacing>
|
||||
</stackView>
|
||||
</subviews>
|
||||
@ -340,11 +356,11 @@ DQ
|
||||
<tableColumnResizingMask key="resizingMask" resizeWithTable="YES" userResizable="YES"/>
|
||||
<prototypeCellViews>
|
||||
<tableCellView id="UBy-AR-7XQ">
|
||||
<rect key="frame" x="1" y="1" width="284" height="24"/>
|
||||
<rect key="frame" x="1" y="1" width="285" height="24"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<popUpButton toolTip="Audio encoder." verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="6lx-af-rBL">
|
||||
<rect key="frame" x="-1" y="1" width="286" height="22"/>
|
||||
<rect key="frame" x="-1" y="1" width="287" height="22"/>
|
||||
<popUpButtonCell key="cell" type="push" bezelStyle="rounded" alignment="left" controlSize="small" lineBreakMode="truncatingTail" borderStyle="borderAndBezel" imageScaling="proportionallyDown" inset="2" id="t8s-X1-tQV">
|
||||
<behavior key="behavior" lightByBackground="YES" lightByGray="YES"/>
|
||||
<font key="font" metaFont="menu" size="11"/>
|
||||
@ -382,11 +398,11 @@ DQ
|
||||
<tableColumnResizingMask key="resizingMask" resizeWithTable="YES" userResizable="YES"/>
|
||||
<prototypeCellViews>
|
||||
<tableCellView id="uS1-Fd-V9I">
|
||||
<rect key="frame" x="288.5" y="1" width="150" height="24"/>
|
||||
<rect key="frame" x="289" y="1" width="149" height="24"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<popUpButton verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="igm-hS-rrD">
|
||||
<rect key="frame" x="-1" y="1" width="152" height="22"/>
|
||||
<rect key="frame" x="-1" y="1" width="151" height="22"/>
|
||||
<string key="toolTip">Mixdown type. Controls how multi-channel audio is mixed into fewer channels, or whether the original channels are preserved.
|
||||
|
||||
Dolby Surround and Dolby Pro Logic II convert multi-channel audio to stereo and matrix encode additional channels for surround reproduction on compatible equipment, while maintaining stereo compatibility.</string>
|
||||
@ -432,11 +448,11 @@ Dolby Surround and Dolby Pro Logic II convert multi-channel audio to stereo and
|
||||
<tableColumnResizingMask key="resizingMask" resizeWithTable="YES" userResizable="YES"/>
|
||||
<prototypeCellViews>
|
||||
<tableCellView id="5No-Mm-bpD">
|
||||
<rect key="frame" x="441" y="1" width="109" height="24"/>
|
||||
<rect key="frame" x="441" y="1" width="110" height="24"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<popUpButton toolTip="Audio sample rate in kilohertz (kHz). Auto is recommended." verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="r80-yv-59n">
|
||||
<rect key="frame" x="-1" y="1" width="111" height="22"/>
|
||||
<rect key="frame" x="-1" y="1" width="112" height="22"/>
|
||||
<popUpButtonCell key="cell" type="push" bezelStyle="rounded" alignment="left" controlSize="small" lineBreakMode="truncatingTail" borderStyle="borderAndBezel" imageScaling="proportionallyDown" inset="2" id="pdm-QA-coL">
|
||||
<behavior key="behavior" lightByBackground="YES" lightByGray="YES"/>
|
||||
<font key="font" metaFont="menu" size="11"/>
|
||||
@ -476,11 +492,11 @@ Dolby Surround and Dolby Pro Logic II convert multi-channel audio to stereo and
|
||||
<tableColumnResizingMask key="resizingMask" resizeWithTable="YES" userResizable="YES"/>
|
||||
<prototypeCellViews>
|
||||
<tableCellView id="Bxd-gI-dFS">
|
||||
<rect key="frame" x="553.5" y="1" width="96" height="24"/>
|
||||
<rect key="frame" x="554" y="1" width="95" height="24"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<popUpButton verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="hHP-dw-nba">
|
||||
<rect key="frame" x="-1" y="1" width="98" height="22"/>
|
||||
<rect key="frame" x="-1" y="1" width="97" height="22"/>
|
||||
<string key="toolTip">Audio bit rate in kilobits per second (kbps). Smaller values reduce audio quality. Larger values use more data and may be less compatible.</string>
|
||||
<popUpButtonCell key="cell" type="push" bezelStyle="rounded" alignment="left" controlSize="small" lineBreakMode="truncatingTail" borderStyle="borderAndBezel" imageScaling="proportionallyDown" inset="2" id="U8n-oy-hkv">
|
||||
<behavior key="behavior" lightByBackground="YES" lightByGray="YES"/>
|
||||
@ -679,7 +695,7 @@ Gw
|
||||
</connections>
|
||||
</button>
|
||||
<stackView distribution="fill" orientation="vertical" alignment="leading" horizontalStackHuggingPriority="249.99998474121094" verticalStackHuggingPriority="249.99998474121094" detachesHiddenViews="YES" translatesAutoresizingMaskIntoConstraints="NO" id="mON-8C-X5t">
|
||||
<rect key="frame" x="20" y="294" width="431" height="160"/>
|
||||
<rect key="frame" x="20" y="294" width="440" height="160"/>
|
||||
<subviews>
|
||||
<stackView distribution="fill" orientation="horizontal" alignment="centerY" horizontalStackHuggingPriority="249.99998474121094" verticalStackHuggingPriority="249.99998474121094" detachesHiddenViews="YES" translatesAutoresizingMaskIntoConstraints="NO" id="dYR-Xt-Vb4">
|
||||
<rect key="frame" x="0.0" y="144" width="351" height="16"/>
|
||||
@ -729,7 +745,7 @@ All Matching Selected Languages adds all audio tracks matching each of the selec
|
||||
</customSpacing>
|
||||
</stackView>
|
||||
<stackView distribution="fill" orientation="horizontal" alignment="top" horizontalStackHuggingPriority="249.99998474121094" verticalStackHuggingPriority="249.99998474121094" detachesHiddenViews="YES" translatesAutoresizingMaskIntoConstraints="NO" id="GSL-ZN-P2c">
|
||||
<rect key="frame" x="0.0" y="0.0" width="431" height="136"/>
|
||||
<rect key="frame" x="0.0" y="0.0" width="440" height="136"/>
|
||||
<subviews>
|
||||
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" allowsCharacterPickerTouchBarItem="YES" preferredMaxLayoutWidth="300" translatesAutoresizingMaskIntoConstraints="NO" id="Jsz-Er-bsF">
|
||||
<rect key="frame" x="-2" y="122" width="138" height="14"/>
|
||||
@ -740,13 +756,13 @@ All Matching Selected Languages adds all audio tracks matching each of the selec
|
||||
</textFieldCell>
|
||||
</textField>
|
||||
<scrollView toolTip="Select the languages to use with the Track Selection Behavior setting." wantsLayer="YES" autohidesScrollers="YES" horizontalLineScroll="16" horizontalPageScroll="10" verticalLineScroll="16" verticalPageScroll="10" usesPredominantAxisScrolling="NO" translatesAutoresizingMaskIntoConstraints="NO" id="aTC-39-h6S">
|
||||
<rect key="frame" x="142" y="0.0" width="289" height="136"/>
|
||||
<rect key="frame" x="142" y="0.0" width="298" height="136"/>
|
||||
<clipView key="contentView" ambiguous="YES" id="TdE-Sh-NcS">
|
||||
<rect key="frame" x="1" y="1" width="287" height="134"/>
|
||||
<rect key="frame" x="1" y="1" width="296" height="134"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<tableView verticalHuggingPriority="750" ambiguous="YES" allowsExpansionToolTips="YES" columnAutoresizingStyle="lastColumnOnly" tableStyle="plain" columnReordering="NO" columnResizing="NO" autosaveColumns="NO" rowHeight="14" viewBased="YES" id="Of7-71-Ci6">
|
||||
<rect key="frame" x="0.0" y="0.0" width="287" height="134"/>
|
||||
<rect key="frame" x="0.0" y="0.0" width="296" height="134"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<size key="intercellSpacing" width="3" height="2"/>
|
||||
<color key="backgroundColor" name="controlBackgroundColor" catalog="System" colorSpace="catalog"/>
|
||||
@ -764,7 +780,7 @@ All Matching Selected Languages adds all audio tracks matching each of the selec
|
||||
<tableColumnResizingMask key="resizingMask" resizeWithTable="YES" userResizable="YES"/>
|
||||
<prototypeCellViews>
|
||||
<tableCellView id="haT-6q-XQu">
|
||||
<rect key="frame" x="1" y="1" width="226" height="17"/>
|
||||
<rect key="frame" x="1" y="1" width="217" height="17"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<button translatesAutoresizingMaskIntoConstraints="NO" id="F5N-kV-6cy">
|
||||
@ -779,7 +795,7 @@ All Matching Selected Languages adds all audio tracks matching each of the selec
|
||||
</connections>
|
||||
</button>
|
||||
<textField horizontalHuggingPriority="249" verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" allowsCharacterPickerTouchBarItem="YES" translatesAutoresizingMaskIntoConstraints="NO" id="qqA-7S-cT9">
|
||||
<rect key="frame" x="15" y="2" width="210" height="14"/>
|
||||
<rect key="frame" x="15" y="2" width="201" height="14"/>
|
||||
<textFieldCell key="cell" controlSize="small" lineBreakMode="truncatingTail" sendsActionOnEndEditing="YES" title="Table View Cell" id="XKL-2e-Dlv">
|
||||
<font key="font" metaFont="menu" size="11"/>
|
||||
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
|
||||
@ -884,13 +900,14 @@ All Matching Selected Languages adds all audio tracks matching each of the selec
|
||||
<connections>
|
||||
<outlet property="initialFirstResponder" destination="oiD-QI-wly" id="Vxi-xi-P0d"/>
|
||||
</connections>
|
||||
<point key="canvasLocation" x="-1518" y="-211"/>
|
||||
<point key="canvasLocation" x="-1470" y="-241"/>
|
||||
</window>
|
||||
<arrayController objectClassName="HBLang" id="ZBe-aP-wvq" userLabel="Languages Table Controller" customClass="HBLanguageArrayController">
|
||||
<declaredKeys>
|
||||
<string>language</string>
|
||||
<string>isSelected</string>
|
||||
</declaredKeys>
|
||||
<classReference key="objectClass" className="HBLang"/>
|
||||
<connections>
|
||||
<binding destination="-2" name="contentArray" keyPath="languagesList.languagesArray" id="vKV-y3-Zbg"/>
|
||||
<outlet property="tableView" destination="Of7-71-Ci6" id="IBV-kN-tPc"/>
|
||||
@ -905,6 +922,7 @@ All Matching Selected Languages adds all audio tracks matching each of the selec
|
||||
<string>gain</string>
|
||||
<string>drc</string>
|
||||
</declaredKeys>
|
||||
<classReference key="objectClass" className="HBAudioTrackPreset"/>
|
||||
<connections>
|
||||
<binding destination="-2" name="contentArray" keyPath="self.settings.tracksArray" id="oDO-aQ-oZJ"/>
|
||||
</connections>
|
||||
|
@ -39,6 +39,7 @@ typedef NS_ENUM(NSUInteger, HBAudioTrackSelectionBehavior) {
|
||||
@property(nonatomic, readwrite) BOOL allowDTSPassthru;
|
||||
@property(nonatomic, readwrite) BOOL allowMP2Passthru;
|
||||
@property(nonatomic, readwrite) BOOL allowMP3Passthru;
|
||||
@property(nonatomic, readwrite) BOOL allowOpusPassthru;
|
||||
@property(nonatomic, readwrite) BOOL allowTrueHDPassthru;
|
||||
@property(nonatomic, readwrite) BOOL allowFLACPassthru;
|
||||
|
||||
|
@ -124,6 +124,15 @@
|
||||
_allowMP3Passthru = allowMP3Passthru;
|
||||
}
|
||||
|
||||
- (void)setAllowOpusPassthru:(BOOL)allowOpusPassthru
|
||||
{
|
||||
if (allowOpusPassthru != _allowOpusPassthru)
|
||||
{
|
||||
[[self.undo prepareWithInvocationTarget:self] setAllowOpusPassthru:_allowOpusPassthru];
|
||||
}
|
||||
_allowOpusPassthru = allowOpusPassthru;
|
||||
}
|
||||
|
||||
- (void)setAllowTrueHDPassthru:(BOOL)allowTrueHDPassthru
|
||||
{
|
||||
if (allowTrueHDPassthru != _allowTrueHDPassthru)
|
||||
@ -215,6 +224,7 @@
|
||||
self.allowFLACPassthru = NO;
|
||||
self.allowMP2Passthru = NO;
|
||||
self.allowMP3Passthru = NO;
|
||||
self.allowOpusPassthru = NO;
|
||||
self.allowTrueHDPassthru = NO;
|
||||
|
||||
// then, enable allowed passthru encoders
|
||||
@ -249,6 +259,9 @@
|
||||
case HB_ACODEC_MP3_PASS:
|
||||
self.allowMP3Passthru = YES;
|
||||
break;
|
||||
case HB_ACODEC_OPUS_PASS:
|
||||
self.allowOpusPassthru = YES;
|
||||
break;
|
||||
case HB_ACODEC_TRUEHD_PASS:
|
||||
self.allowTrueHDPassthru = YES;
|
||||
break;
|
||||
@ -356,6 +369,10 @@
|
||||
{
|
||||
[copyMask addObject:@(hb_audio_encoder_get_short_name(HB_ACODEC_MP3_PASS))];
|
||||
}
|
||||
if (self.allowOpusPassthru)
|
||||
{
|
||||
[copyMask addObject:@(hb_audio_encoder_get_short_name(HB_ACODEC_OPUS_PASS))];
|
||||
}
|
||||
if (self.allowTrueHDPassthru)
|
||||
{
|
||||
[copyMask addObject:@(hb_audio_encoder_get_short_name(HB_ACODEC_TRUEHD_PASS))];
|
||||
@ -448,6 +465,7 @@
|
||||
copy->_allowDTSPassthru = _allowDTSPassthru;
|
||||
copy->_allowMP2Passthru = _allowMP2Passthru;
|
||||
copy->_allowMP3Passthru = _allowMP3Passthru;
|
||||
copy->_allowOpusPassthru = _allowOpusPassthru;
|
||||
copy->_allowTrueHDPassthru = _allowTrueHDPassthru;
|
||||
copy->_allowFLACPassthru = _allowFLACPassthru;
|
||||
|
||||
@ -482,6 +500,7 @@
|
||||
encodeBool(_allowDTSPassthru);
|
||||
encodeBool(_allowMP2Passthru);
|
||||
encodeBool(_allowMP3Passthru);
|
||||
encodeBool(_allowOpusPassthru);
|
||||
encodeBool(_allowTrueHDPassthru);
|
||||
encodeBool(_allowFLACPassthru);
|
||||
|
||||
@ -510,6 +529,7 @@
|
||||
decodeBool(_allowDTSPassthru);
|
||||
decodeBool(_allowMP2Passthru);
|
||||
decodeBool(_allowMP3Passthru);
|
||||
decodeBool(_allowOpusPassthru);
|
||||
decodeBool(_allowTrueHDPassthru);
|
||||
decodeBool(_allowFLACPassthru);
|
||||
|
||||
|
@ -356,6 +356,10 @@
|
||||
{
|
||||
job->acodec_copy_mask |= HB_ACODEC_MP3_PASS;
|
||||
}
|
||||
if (audioDefaults.allowOpusPassthru)
|
||||
{
|
||||
job->acodec_copy_mask |= HB_ACODEC_OPUS_PASS;
|
||||
}
|
||||
if (audioDefaults.allowTrueHDPassthru)
|
||||
{
|
||||
job->acodec_copy_mask |= HB_ACODEC_TRUEHD_PASS;
|
||||
|
@ -730,7 +730,7 @@ namespace HandBrake.Interop.Interop
|
||||
return HBFunctions.hb_audio_compression_get_default((uint)encoder.Id);
|
||||
}
|
||||
|
||||
public static uint BuildCopyMask(bool audioAllowMP2Pass, bool audioAllowMP3Pass, bool audioAllowAACPass, bool audioAllowAC3Pass, bool audioAllowDTSPass, bool audioAllowDTSHDPass, bool audioAllowEac3Pass, bool audioAllowFlacPass, bool audioAllowTruehdPass)
|
||||
public static uint BuildCopyMask(bool audioAllowMP2Pass, bool audioAllowMP3Pass, bool audioAllowAACPass, bool audioAllowOpusPass, bool audioAllowAC3Pass, bool audioAllowDTSPass, bool audioAllowDTSHDPass, bool audioAllowEac3Pass, bool audioAllowFlacPass, bool audioAllowTruehdPass)
|
||||
{
|
||||
uint mask = 0;
|
||||
|
||||
@ -749,6 +749,11 @@ namespace HandBrake.Interop.Interop
|
||||
mask |= NativeConstants.HB_ACODEC_AAC_PASS;
|
||||
}
|
||||
|
||||
if (audioAllowOpusPass)
|
||||
{
|
||||
mask |= NativeConstants.HB_ACODEC_OPUS_PASS;
|
||||
}
|
||||
|
||||
if (audioAllowAC3Pass)
|
||||
{
|
||||
mask |= NativeConstants.HB_ACODEC_AC3_PASS;
|
||||
|
@ -21,9 +21,10 @@ namespace HandBrake.Interop.Interop.HbLib
|
||||
public const uint HB_ACODEC_FFFLAC = 0x00100000;
|
||||
public const uint HB_ACODEC_FFEAC3 = 0x01000000;
|
||||
public const uint HB_ACODEC_FFTRUEHD = 0x02000000;
|
||||
public const uint HB_ACODEC_PASS_FLAG = 0x40000000;
|
||||
public const uint HB_ACODEC_OPUS = 0x04000000;
|
||||
public const uint HB_ACODEC_MP2 = 0x08000000;
|
||||
public const uint HB_ACODEC_PASS_MASK = (HB_ACODEC_AC3 | HB_ACODEC_DCA | HB_ACODEC_DCA_HD | HB_ACODEC_FFAAC | HB_ACODEC_FFEAC3 | HB_ACODEC_FFFLAC | HB_ACODEC_MP2 | HB_ACODEC_MP3 | HB_ACODEC_FFTRUEHD);
|
||||
public const uint HB_ACODEC_PASS_FLAG = 0x40000000;
|
||||
public const uint HB_ACODEC_PASS_MASK = (HB_ACODEC_AC3 | HB_ACODEC_DCA | HB_ACODEC_DCA_HD | HB_ACODEC_FFAAC | HB_ACODEC_FFEAC3 | HB_ACODEC_FFFLAC | HB_ACODEC_MP2 | HB_ACODEC_MP3 | HB_ACODEC_FFTRUEHD | HB_ACODEC_OPUS);
|
||||
|
||||
public const uint HB_ACODEC_MASK = 0x0FFFFF01;
|
||||
public const uint HB_ACODEC_AUTO_PASS = (HB_ACODEC_PASS_FLAG | HB_ACODEC_PASS_MASK);
|
||||
@ -37,6 +38,7 @@ namespace HandBrake.Interop.Interop.HbLib
|
||||
public const uint HB_ACODEC_MP3_PASS = (HB_ACODEC_PASS_FLAG | HB_ACODEC_MP3);
|
||||
public const uint HB_ACODEC_TRUEHD_PASS = (HB_ACODEC_PASS_FLAG | HB_ACODEC_FFTRUEHD);
|
||||
public const uint HB_ACODEC_MP2_PASS = (HB_ACODEC_PASS_FLAG | HB_ACODEC_MP2);
|
||||
public const uint HB_ACODEC_OPUS_PASS = (HB_ACODEC_PASS_FLAG | HB_ACODEC_OPUS);
|
||||
|
||||
// VideoEncoders
|
||||
public const uint HB_VCODEC_QSV_H264 = 0x0000100;
|
||||
|
@ -81,7 +81,6 @@ namespace HandBrakeWPF.Converters.Audio
|
||||
encoders.Remove(AudioEncoder.ffflac);
|
||||
encoders.Remove(AudioEncoder.ffflac24);
|
||||
encoders.Remove(AudioEncoder.FlacPassthru);
|
||||
encoders.Remove(AudioEncoder.Opus);
|
||||
|
||||
encoders.Remove(AudioEncoder.TrueHDPassthrough);
|
||||
}
|
||||
@ -103,6 +102,7 @@ namespace HandBrakeWPF.Converters.Audio
|
||||
encoders.Remove(AudioEncoder.Passthrough);
|
||||
encoders.Remove(AudioEncoder.TrueHDPassthrough);
|
||||
encoders.Remove(AudioEncoder.FlacPassthru);
|
||||
encoders.Remove(AudioEncoder.OpusPassthru);
|
||||
|
||||
encoders.Add(AudioEncoder.None);
|
||||
}
|
||||
@ -121,6 +121,7 @@ namespace HandBrakeWPF.Converters.Audio
|
||||
RemoveIfNotSupported(AudioEncoder.TrueHDPassthrough, sourceTrack, encoders);
|
||||
RemoveIfNotSupported(AudioEncoder.FlacPassthru, sourceTrack, encoders);
|
||||
RemoveIfNotSupported(AudioEncoder.Mp2Passthru, sourceTrack, encoders);
|
||||
RemoveIfNotSupported(AudioEncoder.OpusPassthru, sourceTrack, encoders);
|
||||
}
|
||||
|
||||
return EnumHelper<AudioEncoder>.GetEnumDisplayValuesSubset(encoders);
|
||||
|
@ -343,9 +343,10 @@ namespace HandBrakeWPF.Model.Audio
|
||||
{
|
||||
if (this.Encoder == AudioEncoder.Ac3Passthrough || this.Encoder == AudioEncoder.DtsPassthrough
|
||||
|| this.Encoder == AudioEncoder.DtsHDPassthrough || this.Encoder == AudioEncoder.AacPassthru
|
||||
|| this.Encoder == AudioEncoder.Mp3Passthru || this.Encoder == AudioEncoder.Passthrough ||
|
||||
this.Encoder == AudioEncoder.EAc3Passthrough || this.Encoder == AudioEncoder.TrueHDPassthrough
|
||||
|| this.Encoder == AudioEncoder.FlacPassthru || this.Encoder == AudioEncoder.Mp2Passthru)
|
||||
|| this.Encoder == AudioEncoder.Mp3Passthru || this.Encoder == AudioEncoder.Passthrough
|
||||
|| this.Encoder == AudioEncoder.EAc3Passthrough || this.Encoder == AudioEncoder.TrueHDPassthrough
|
||||
|| this.Encoder == AudioEncoder.FlacPassthru || this.Encoder == AudioEncoder.Mp2Passthru
|
||||
|| this.Encoder == AudioEncoder.OpusPassthru)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
@ -290,6 +290,7 @@ namespace HandBrakeWPF.Services.Encode.Factories
|
||||
if (job.AudioPassthruOptions.AudioAllowMP3Pass) copyMaskList.Add(EnumHelper<AudioEncoder>.GetShortName(AudioEncoder.Mp3Passthru));
|
||||
if (job.AudioPassthruOptions.AudioAllowTrueHDPass) copyMaskList.Add(EnumHelper<AudioEncoder>.GetShortName(AudioEncoder.TrueHDPassthrough));
|
||||
if (job.AudioPassthruOptions.AudioAllowMP2Pass) copyMaskList.Add(EnumHelper<AudioEncoder>.GetShortName(AudioEncoder.Mp2Passthru));
|
||||
if (job.AudioPassthruOptions.AudioAllowOpusPass) copyMaskList.Add(EnumHelper<AudioEncoder>.GetShortName(AudioEncoder.OpusPassthru));
|
||||
|
||||
audio.CopyMask = copyMaskList.ToArray();
|
||||
|
||||
|
@ -24,6 +24,7 @@ namespace HandBrakeWPF.Services.Encode.Model.Models
|
||||
this.AudioAllowTrueHDPass = true;
|
||||
this.AudioAllowFlacPass = true;
|
||||
this.AudioAllowMP2Pass = true;
|
||||
this.AudioAllowOpusPass = true;
|
||||
|
||||
this.AudioEncoderFallback = AudioEncoder.Ac3;
|
||||
}
|
||||
@ -39,6 +40,7 @@ namespace HandBrakeWPF.Services.Encode.Model.Models
|
||||
this.AudioAllowTrueHDPass = initialValue;
|
||||
this.AudioAllowFlacPass = initialValue;
|
||||
this.AudioAllowMP2Pass = initialValue;
|
||||
this.AudioAllowOpusPass = initialValue;
|
||||
|
||||
this.AudioEncoderFallback = AudioEncoder.Ac3;
|
||||
}
|
||||
@ -55,6 +57,7 @@ namespace HandBrakeWPF.Services.Encode.Model.Models
|
||||
this.AudioAllowTrueHDPass = initialValue.AudioAllowTrueHDPass;
|
||||
this.AudioAllowFlacPass = initialValue.AudioAllowFlacPass;
|
||||
this.AudioAllowMP2Pass = initialValue.AudioAllowMP2Pass;
|
||||
this.AudioAllowOpusPass = initialValue.AudioAllowOpusPass;
|
||||
|
||||
this.AudioEncoderFallback = initialValue.AudioEncoderFallback;
|
||||
}
|
||||
@ -78,6 +81,8 @@ namespace HandBrakeWPF.Services.Encode.Model.Models
|
||||
|
||||
public bool AudioAllowMP2Pass { get; set; }
|
||||
|
||||
public bool AudioAllowOpusPass { get; set; }
|
||||
|
||||
public AudioEncoder AudioEncoderFallback { get; set; }
|
||||
|
||||
public IEnumerable<AudioEncoder> AllowedPassthruOptions
|
||||
@ -121,6 +126,10 @@ namespace HandBrakeWPF.Services.Encode.Model.Models
|
||||
{
|
||||
audioEncoders.Add(AudioEncoder.Mp2Passthru);
|
||||
}
|
||||
if (this.AudioAllowOpusPass)
|
||||
{
|
||||
audioEncoders.Add(AudioEncoder.OpusPassthru);
|
||||
}
|
||||
|
||||
return audioEncoders;
|
||||
}
|
||||
@ -137,6 +146,7 @@ namespace HandBrakeWPF.Services.Encode.Model.Models
|
||||
this.AudioAllowTrueHDPass = false;
|
||||
this.AudioAllowFlacPass = false;
|
||||
this.AudioAllowMP2Pass = false;
|
||||
this.AudioAllowOpusPass = false;
|
||||
}
|
||||
}
|
||||
}
|
@ -99,5 +99,9 @@ namespace HandBrakeWPF.Services.Encode.Model.Models
|
||||
[DisplayName("Opus (libopus)")]
|
||||
[ShortName("opus")]
|
||||
Opus,
|
||||
|
||||
[DisplayName("Opus Passthru")]
|
||||
[ShortName("copy:opus")]
|
||||
OpusPassthru,
|
||||
}
|
||||
}
|
||||
|
@ -114,6 +114,7 @@ namespace HandBrakeWPF.Services.Encode.Model.Models
|
||||
fallback.AudioAllowMP2Pass,
|
||||
fallback.AudioAllowMP3Pass,
|
||||
fallback.AudioAllowAACPass,
|
||||
fallback.AudioAllowOpusPass,
|
||||
fallback.AudioAllowAC3Pass,
|
||||
fallback.AudioAllowDTSPass,
|
||||
fallback.AudioAllowDTSHDPass,
|
||||
@ -427,9 +428,10 @@ namespace HandBrakeWPF.Services.Encode.Model.Models
|
||||
{
|
||||
if (this.Encoder == AudioEncoder.Ac3Passthrough || this.Encoder == AudioEncoder.DtsPassthrough
|
||||
|| this.Encoder == AudioEncoder.DtsHDPassthrough || this.Encoder == AudioEncoder.AacPassthru
|
||||
|| this.Encoder == AudioEncoder.Mp3Passthru || this.Encoder == AudioEncoder.Passthrough ||
|
||||
this.Encoder == AudioEncoder.EAc3Passthrough || this.Encoder == AudioEncoder.TrueHDPassthrough
|
||||
|| this.Encoder == AudioEncoder.FlacPassthru || this.Encoder == AudioEncoder.Mp2Passthru)
|
||||
|| this.Encoder == AudioEncoder.Mp3Passthru || this.Encoder == AudioEncoder.Passthrough
|
||||
|| this.Encoder == AudioEncoder.EAc3Passthrough || this.Encoder == AudioEncoder.TrueHDPassthrough
|
||||
|| this.Encoder == AudioEncoder.FlacPassthru || this.Encoder == AudioEncoder.Mp2Passthru
|
||||
|| this.Encoder == AudioEncoder.OpusPassthru)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
@ -416,6 +416,9 @@ namespace HandBrakeWPF.Services.Presets.Factories
|
||||
case AudioEncoder.TrueHDPassthrough:
|
||||
preset.AudioTrackBehaviours.AllowedPassthruOptions.AudioAllowTrueHDPass = true;
|
||||
break;
|
||||
case AudioEncoder.OpusPassthru:
|
||||
preset.AudioTrackBehaviours.AllowedPassthruOptions.AudioAllowOpusPass = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -170,6 +170,20 @@ namespace HandBrakeWPF.ViewModels
|
||||
}
|
||||
}
|
||||
|
||||
public bool AudioAllowOpusPass
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.audioBehaviours.AllowedPassthruOptions.AudioAllowOpusPass;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
this.audioBehaviours.AllowedPassthruOptions.AudioAllowOpusPass = value;
|
||||
this.NotifyOfPropertyChange(() => this.AudioAllowOpusPass);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating whether audio allow ac3 pass.
|
||||
/// </summary>
|
||||
@ -483,6 +497,7 @@ namespace HandBrakeWPF.ViewModels
|
||||
this.NotifyOfPropertyChange(() => this.AudioAllowMP2Pass);
|
||||
this.NotifyOfPropertyChange(() => this.AudioAllowMP3Pass);
|
||||
this.NotifyOfPropertyChange(() => this.AudioAllowAACPass);
|
||||
this.NotifyOfPropertyChange(() => this.AudioAllowOpusPass);
|
||||
this.NotifyOfPropertyChange(() => this.AudioAllowAC3Pass);
|
||||
this.NotifyOfPropertyChange(() => this.AudioAllowEAC3Pass);
|
||||
this.NotifyOfPropertyChange(() => this.AudioAllowDTSPass);
|
||||
@ -533,7 +548,7 @@ namespace HandBrakeWPF.ViewModels
|
||||
private void CorrectAudioEncoders(OutputFormat outputFormat)
|
||||
{
|
||||
if (outputFormat == OutputFormat.Mp4 &&
|
||||
(this.AudioEncoderFallback == AudioEncoder.ffflac || this.AudioEncoderFallback == AudioEncoder.ffflac24 || this.AudioEncoderFallback == AudioEncoder.Vorbis || this.AudioEncoderFallback == AudioEncoder.Opus))
|
||||
(this.AudioEncoderFallback == AudioEncoder.ffflac || this.AudioEncoderFallback == AudioEncoder.ffflac24 || this.AudioEncoderFallback == AudioEncoder.Vorbis))
|
||||
{
|
||||
this.AudioEncoderFallback = AudioEncoder.ffaac;
|
||||
}
|
||||
|
@ -301,6 +301,11 @@ namespace HandBrakeWPF.ViewModels
|
||||
return false;
|
||||
}
|
||||
|
||||
if (preset.AudioTrackBehaviours.AllowedPassthruOptions.AudioAllowOpusPass != this.Task.AudioPassthruOptions.AudioAllowOpusPass)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (preset.AudioTrackBehaviours.AllowedPassthruOptions.AudioAllowAC3Pass != this.Task.AudioPassthruOptions.AudioAllowAC3Pass)
|
||||
{
|
||||
return false;
|
||||
|
@ -148,6 +148,7 @@
|
||||
</StackPanel>
|
||||
|
||||
<StackPanel Margin="10,10,0,0" Orientation="Vertical" Grid.Column="1">
|
||||
<CheckBox Margin="0,2,5,0" Content="Opus" VerticalAlignment="Center" IsChecked="{Binding AudioAllowOpusPass}" />
|
||||
<CheckBox Margin="0,2,5,0" Content="FLAC" VerticalAlignment="Center" IsChecked="{Binding AudioAllowFlacPass}" />
|
||||
<CheckBox Margin="0,2,5,0" Content="DTS" VerticalAlignment="Center" IsChecked="{Binding AudioAllowDTSPass}" />
|
||||
<CheckBox Margin="0,2,5,0" Content="DTSHD" VerticalAlignment="Center" IsChecked="{Binding AudioAllowDTSHDPass}" />
|
||||
|
Loading…
x
Reference in New Issue
Block a user