diff options
author | v0lt <v0lt@users.sourceforge.net> | 2012-06-18 20:18:36 +0400 |
---|---|---|
committer | v0lt <v0lt@users.sourceforge.net> | 2012-06-18 20:18:36 +0400 |
commit | 162d351e6489eea2697017e9fd17ff8848ea798a (patch) | |
tree | a10cca67eb746b1c46bb736c4362cff1a331ca16 | |
parent | 93d9eeb7b741b7ac2dc71e19822d967cb2d7180b (diff) |
MpaDecFilter: use ffmpeg instead of liba52 for AC3 decoding
git-svn-id: https://mpc-hc.svn.sourceforge.net/svnroot/mpc-hc/trunk@5185 10f7b99b-c216-0410-bff0-8a66a9350fd8
-rw-r--r-- | mpc-hc.sln | 19 | ||||
-rw-r--r-- | src/filters/transform/MpaDecFilter/MpaDecFilter.cpp | 85 | ||||
-rw-r--r-- | src/filters/transform/MpaDecFilter/MpaDecFilter.h | 11 | ||||
-rw-r--r-- | src/filters/transform/MpaDecFilter/MpaDecFilter.vcxproj | 4 | ||||
-rw-r--r-- | src/filters/transform/MpaDecFilter/MpaDecSettingsWnd.cpp | 34 | ||||
-rw-r--r-- | src/mpc-hc/PPageInternalFilters.cpp | 2 | ||||
-rw-r--r-- | src/mpc-hc/mpc-hc.vcxproj | 4 |
7 files changed, 87 insertions, 72 deletions
diff --git a/mpc-hc.sln b/mpc-hc.sln index 99396ba7f..5edc5d0c0 100644 --- a/mpc-hc.sln +++ b/mpc-hc.sln @@ -51,8 +51,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "BaseClasses", "src\thirdpar EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Filters", "src\filters\Filters.vcxproj", "{273B3149-3192-4B75-A791-470320B90812}"
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "liba52", "src\thirdparty\a52dec\vc++\liba52.vcxproj", "{62FE6D94-E17C-4A8E-8D3C-7A589A70D865}"
-EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ffmpeg", "src\thirdparty\ffmpeg\ffmpeg.vcxproj", "{438286B7-A9F4-411D-BCC5-948C40E37D8F}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libdca", "src\thirdparty\libdca\vc++\libdca.vcxproj", "{FAE14DBE-B508-4AB3-929D-75C68E4EBBC1}"
@@ -363,22 +361,6 @@ Global {273B3149-3192-4B75-A791-470320B90812}.Release|Win32.Build.0 = Release|Win32
{273B3149-3192-4B75-A791-470320B90812}.Release|x64.ActiveCfg = Release|x64
{273B3149-3192-4B75-A791-470320B90812}.Release|x64.Build.0 = Release|x64
- {62FE6D94-E17C-4A8E-8D3C-7A589A70D865}.Debug Filter|Win32.ActiveCfg = Debug|Win32
- {62FE6D94-E17C-4A8E-8D3C-7A589A70D865}.Debug Filter|Win32.Build.0 = Debug|Win32
- {62FE6D94-E17C-4A8E-8D3C-7A589A70D865}.Debug Filter|x64.ActiveCfg = Debug|x64
- {62FE6D94-E17C-4A8E-8D3C-7A589A70D865}.Debug Filter|x64.Build.0 = Debug|x64
- {62FE6D94-E17C-4A8E-8D3C-7A589A70D865}.Debug|Win32.ActiveCfg = Debug|Win32
- {62FE6D94-E17C-4A8E-8D3C-7A589A70D865}.Debug|Win32.Build.0 = Debug|Win32
- {62FE6D94-E17C-4A8E-8D3C-7A589A70D865}.Debug|x64.ActiveCfg = Debug|x64
- {62FE6D94-E17C-4A8E-8D3C-7A589A70D865}.Debug|x64.Build.0 = Debug|x64
- {62FE6D94-E17C-4A8E-8D3C-7A589A70D865}.Release Filter|Win32.ActiveCfg = Release|Win32
- {62FE6D94-E17C-4A8E-8D3C-7A589A70D865}.Release Filter|Win32.Build.0 = Release|Win32
- {62FE6D94-E17C-4A8E-8D3C-7A589A70D865}.Release Filter|x64.ActiveCfg = Release|x64
- {62FE6D94-E17C-4A8E-8D3C-7A589A70D865}.Release Filter|x64.Build.0 = Release|x64
- {62FE6D94-E17C-4A8E-8D3C-7A589A70D865}.Release|Win32.ActiveCfg = Release|Win32
- {62FE6D94-E17C-4A8E-8D3C-7A589A70D865}.Release|Win32.Build.0 = Release|Win32
- {62FE6D94-E17C-4A8E-8D3C-7A589A70D865}.Release|x64.ActiveCfg = Release|x64
- {62FE6D94-E17C-4A8E-8D3C-7A589A70D865}.Release|x64.Build.0 = Release|x64
{438286B7-A9F4-411D-BCC5-948C40E37D8F}.Debug Filter|Win32.ActiveCfg = Debug|Win32
{438286B7-A9F4-411D-BCC5-948C40E37D8F}.Debug Filter|Win32.Build.0 = Debug|Win32
{438286B7-A9F4-411D-BCC5-948C40E37D8F}.Debug Filter|x64.ActiveCfg = Debug|x64
@@ -1150,7 +1132,6 @@ Global {C2082189-3ECB-4079-91FA-89D3C8A305C0} = {D9A0529B-9EC4-4D30-9E05-A5D533739D95}
{E8A3F6FA-AE1C-4C8E-A0B6-9C8480324EAA} = {D9A0529B-9EC4-4D30-9E05-A5D533739D95}
{273B3149-3192-4B75-A791-470320B90812} = {D9A0529B-9EC4-4D30-9E05-A5D533739D95}
- {62FE6D94-E17C-4A8E-8D3C-7A589A70D865} = {D9A0529B-9EC4-4D30-9E05-A5D533739D95}
{438286B7-A9F4-411D-BCC5-948C40E37D8F} = {D9A0529B-9EC4-4D30-9E05-A5D533739D95}
{FAE14DBE-B508-4AB3-929D-75C68E4EBBC1} = {D9A0529B-9EC4-4D30-9E05-A5D533739D95}
{4CEFBC84-C215-11DB-8314-0800200C9A66} = {D9A0529B-9EC4-4D30-9E05-A5D533739D95}
diff --git a/src/filters/transform/MpaDecFilter/MpaDecFilter.cpp b/src/filters/transform/MpaDecFilter/MpaDecFilter.cpp index aed8f7d56..0de000044 100644 --- a/src/filters/transform/MpaDecFilter/MpaDecFilter.cpp +++ b/src/filters/transform/MpaDecFilter/MpaDecFilter.cpp @@ -45,6 +45,9 @@ void* __imp_vscprintf = _vscprintf; #include <vector>
#include "ffmpeg/libavcodec/avcodec.h"
#include "ffmpeg/libavutil/intreadwrite.h"
+extern "C" {
+#include "ffmpeg/libavutil/opt.h"
+}
#define INT8_PEAK 128
#define INT16_PEAK 32768
@@ -119,8 +122,11 @@ static const FFMPEG_AUDIO_CODECS ffAudioCodecs[] = { { &MEDIASUBTYPE_SIPR, CODEC_ID_SIPR },
{ &MEDIASUBTYPE_RAAC, CODEC_ID_AAC },
{ &MEDIASUBTYPE_RACP, CODEC_ID_AAC },
+ { &MEDIASUBTYPE_DNET, CODEC_ID_AC3 },
#endif
#if INTERNAL_DECODER_AC3
+ { &MEDIASUBTYPE_DOLBY_AC3, CODEC_ID_AC3 },
+ { &MEDIASUBTYPE_WAVE_DOLBY_AC3, CODEC_ID_AC3 },
{ &MEDIASUBTYPE_DOLBY_DDPLUS, CODEC_ID_EAC3 },
{ &MEDIASUBTYPE_DOLBY_TRUEHD, CODEC_ID_TRUEHD },
{ &MEDIASUBTYPE_MLP, CODEC_ID_MLP },
@@ -299,7 +305,7 @@ static struct scmap_t { // lets see how we can map these things to dshow (oh the joy!)
-s_scmap_a52dec[2 * 11] = {
+/*s_scmap_a52dec[2 * 11] = {
{2, {0, 1, -1, -1, -1, -1, -1, -1}, 0}, // A52_CHANNEL
{1, {0, -1, -1, -1, -1, -1, -1, -1}, 0}, // A52_MONO
{2, {0, 1, -1, -1, -1, -1, -1, -1}, 0}, // A52_STEREO
@@ -323,7 +329,7 @@ s_scmap_a52dec[2 * 11] = { {2, {1, 0, -1, -1, -1, -1, -1, -1}, SPEAKER_FRONT_CENTER | SPEAKER_LOW_FREQUENCY}, // A52_CHANNEL1|A52_LFE
{2, {1, 0, -1, -1, -1, -1, -1, -1}, SPEAKER_FRONT_CENTER | SPEAKER_LOW_FREQUENCY}, // A52_CHANNEL2|A52_LFE
{3, {1, 2, 0, -1, -1, -1, -1, -1}, SPEAKER_FRONT_LEFT | SPEAKER_FRONT_RIGHT | SPEAKER_LOW_FREQUENCY}, // A52_DOLBY|A52_LFE
-},
+},*/
s_scmap_libdca[2 * 10] = {
{1, {0, -1, -1, -1, -1, -1, -1, -1}, 0}, // DTS_MONO
@@ -413,7 +419,7 @@ CMpaDecFilter::CMpaDecFilter(LPUNKNOWN lpunk, HRESULT* phr) return;
}
- m_iSpeakerConfig[ac3] = A52_STEREO;
+ m_iSpeakerConfig[ac3] = /*A52_STEREO*/2;
m_iSpeakerConfig[dts] = DTS_STEREO;
m_fDynamicRangeControl[ac3] = false;
m_fDynamicRangeControl[dts] = false;
@@ -427,9 +433,9 @@ CMpaDecFilter::CMpaDecFilter(LPUNKNOWN lpunk, HRESULT* phr) m_nFFBufferSize = 0;
#endif
-#if defined(STANDALONE_FILTER) || INTERNAL_DECODER_AC3
+/*#if defined(STANDALONE_FILTER) || INTERNAL_DECODER_AC3
m_a52_state = NULL;
-#endif
+#endif*/
#if defined(STANDALONE_FILTER) || INTERNAL_DECODER_DTS
m_dts_state = NULL;
@@ -594,6 +600,14 @@ HRESULT CMpaDecFilter::Receive(IMediaSample* pIn) memcpy(m_buff.GetData() + bufflen, pDataIn, len);
len += bufflen;
+#if defined(REGISTER_FILTER) || INTERNAL_DECODER_AC3
+ if (GetSpeakerConfig(ac3) < 0 &&
+ (subtype == MEDIASUBTYPE_DOLBY_AC3 ||
+ subtype == MEDIASUBTYPE_WAVE_DOLBY_AC3 ||
+ subtype == MEDIASUBTYPE_DNET)) {
+ return ProcessAC3SPDIF();
+ }
+#endif
#if defined(STANDALONE_FILTER) || HAS_FFMPEG_AUDIO_DECODERS
enum CodecID nCodecId = FindCodec(subtype);
if (nCodecId != CODEC_ID_NONE) {
@@ -608,13 +622,6 @@ HRESULT CMpaDecFilter::Receive(IMediaSample* pIn) hr = ProcessHdmvLPCM(!!pIn->IsSyncPoint());
}
#endif
-#if defined(STANDALONE_FILTER) || INTERNAL_DECODER_AC3
- else if (subtype == MEDIASUBTYPE_DOLBY_AC3 ||
- subtype == MEDIASUBTYPE_WAVE_DOLBY_AC3 ||
- subtype == MEDIASUBTYPE_DNET) {
- hr = ProcessAC3();
- }
-#endif
#if defined(STANDALONE_FILTER) || INTERNAL_DECODER_DTS
else if (subtype == MEDIASUBTYPE_DTS || subtype == MEDIASUBTYPE_WAVE_DTS) {
hr = ProcessDTS();
@@ -841,7 +848,7 @@ HRESULT CMpaDecFilter::ProcessHdmvLPCM(bool bAlignOldBuffer) // Blu ray LPCM #endif /* INTERNAL_DECODER_LPCM */
#if defined(STANDALONE_FILTER) || INTERNAL_DECODER_AC3
-HRESULT CMpaDecFilter::ProcessA52(BYTE* p, int buffsize, int& size, bool& fEnoughData)
+/*HRESULT CMpaDecFilter::ProcessA52(BYTE* p, int buffsize, int& size, bool& fEnoughData)
{
int flags, sample_rate, bit_rate;
@@ -902,9 +909,9 @@ HRESULT CMpaDecFilter::ProcessA52(BYTE* p, int buffsize, int& size, bool& fEnoug }
return S_OK;
-}
+}*/
-HRESULT CMpaDecFilter::ProcessAC3()
+/*HRESULT CMpaDecFilter::ProcessAC3()
{
HRESULT hr;
BYTE* p = m_buff.GetData();
@@ -915,7 +922,7 @@ HRESULT CMpaDecFilter::ProcessAC3() int size = 0;
bool fEnoughData = true;
- if (m_DolbyDigitalMode != DD_TRUEHD && m_DolbyDigitalMode != DD_MLP && (*((__int16*)p) == 0x770b)) { /* AC3-EAC3 syncword */
+ if (m_DolbyDigitalMode != DD_TRUEHD && m_DolbyDigitalMode != DD_MLP && (*((__int16*)p) == 0x770b)) { // AC3-EAC3 syncword
BYTE bsid = p[5] >> 3;
if (bsid <= 10) {
if (FAILED(hr = ProcessA52(p, int(end - p), size, fEnoughData))) {
@@ -979,6 +986,40 @@ HRESULT CMpaDecFilter::ProcessAC3() m_buff.SetCount(end - p);
return S_OK;
+}*/
+
+HRESULT CMpaDecFilter::ProcessAC3SPDIF()
+{
+ HRESULT hr;
+ BYTE* base = m_buff.GetData();
+ BYTE* p = base;
+ BYTE* end = base + m_buff.GetCount();
+
+ while (p < end && (end - p) >= AC3_HEADER_SIZE) {
+ int size = 0;
+ int samplerate, channels, framelength, bitrate;
+
+ size = ParseAC3Header(p, &samplerate, &channels, &framelength, &bitrate);
+
+ if (size == 0) {
+ p++;
+ continue;
+ }
+ if (size > (end - p)) {
+ break;
+ }
+
+ if (FAILED(hr = DeliverBitstream(p, size, samplerate, 1536, 0x0001))) {
+ return hr;
+ }
+
+ p += size;
+ }
+
+ memmove(base, p, end - p);
+ m_buff.SetCount(end - p);
+
+ return S_OK;
}
#endif /* INTERNAL_DECODER_AC3 */
@@ -1896,9 +1937,9 @@ HRESULT CMpaDecFilter::StartStreaming() return hr;
}
-#if defined(STANDALONE_FILTER) || INTERNAL_DECODER_AC3
+/*#if defined(STANDALONE_FILTER) || INTERNAL_DECODER_AC3
m_a52_state = a52_init(0);
-#endif
+#endif*/
#if defined(STANDALONE_FILTER) || INTERNAL_DECODER_DTS
m_dts_state = dts_init(0);
@@ -1913,12 +1954,12 @@ HRESULT CMpaDecFilter::StartStreaming() HRESULT CMpaDecFilter::StopStreaming()
{
-#if defined(STANDALONE_FILTER) || INTERNAL_DECODER_AC3
+/*#if defined(STANDALONE_FILTER) || INTERNAL_DECODER_AC3
if (m_a52_state != NULL) {
a52_free(m_a52_state);
m_a52_state = NULL;
}
-#endif
+#endif*/
#if defined(STANDALONE_FILTER) || INTERNAL_DECODER_DTS
if (m_dts_state != NULL) {
@@ -2014,14 +2055,14 @@ STDMETHODIMP CMpaDecFilter::SaveSettings() CRegKey key;
if (ERROR_SUCCESS == key.Create(HKEY_CURRENT_USER, _T("Software\\Gabest\\Filters\\MPEG Audio Decoder"))) {
key.SetDWORDValue(_T("SampleFormat"), m_iSampleFormat);
- key.SetDWORDValue(_T("Ac3SpeakerConfig"), m_iSpeakerConfig[ac3]);
+ //key.SetDWORDValue(_T("Ac3SpeakerConfig"), m_iSpeakerConfig[ac3]);
key.SetDWORDValue(_T("DtsSpeakerConfig"), m_iSpeakerConfig[dts]);
key.SetDWORDValue(_T("Ac3DynamicRangeControl"), m_fDynamicRangeControl[ac3]);
key.SetDWORDValue(_T("DtsDynamicRangeControl"), m_fDynamicRangeControl[dts]);
}
#else
AfxGetApp()->WriteProfileInt(_T("Filters\\MPEG Audio Decoder"), _T("SampleFormat"), m_iSampleFormat);
- AfxGetApp()->WriteProfileInt(_T("Filters\\MPEG Audio Decoder"), _T("Ac3SpeakerConfig"), m_iSpeakerConfig[ac3]);
+ //AfxGetApp()->WriteProfileInt(_T("Filters\\MPEG Audio Decoder"), _T("Ac3SpeakerConfig"), m_iSpeakerConfig[ac3]);
AfxGetApp()->WriteProfileInt(_T("Filters\\MPEG Audio Decoder"), _T("DtsSpeakerConfig"), m_iSpeakerConfig[dts]);
AfxGetApp()->WriteProfileInt(_T("Filters\\MPEG Audio Decoder"), _T("Ac3DynamicRangeControl"), m_fDynamicRangeControl[ac3]);
AfxGetApp()->WriteProfileInt(_T("Filters\\MPEG Audio Decoder"), _T("DtsDynamicRangeControl"), m_fDynamicRangeControl[dts]);
diff --git a/src/filters/transform/MpaDecFilter/MpaDecFilter.h b/src/filters/transform/MpaDecFilter/MpaDecFilter.h index 93a82f2d6..cd055ffb0 100644 --- a/src/filters/transform/MpaDecFilter/MpaDecFilter.h +++ b/src/filters/transform/MpaDecFilter/MpaDecFilter.h @@ -30,7 +30,7 @@ #pragma warning(disable: 4005)
#include <stdint.h>
#pragma warning(pop)
-#include "a52dec/include/a52.h"
+//#include "a52dec/include/a52.h"
#include "libdca/include/dts.h"
#include "../../../DeCSS/DeCSSInputPin.h"
#include "IMpaDecFilter.h"
@@ -65,9 +65,9 @@ class __declspec(uuid("3D446B6F-71DE-4437-BE15-8CE47174340F")) protected:
CCritSec m_csReceive;
-#if defined(STANDALONE_FILTER) || INTERNAL_DECODER_AC3
+/*#if defined(STANDALONE_FILTER) || INTERNAL_DECODER_AC3
a52_state_t* m_a52_state;
-#endif
+#endif*/
#if defined(STANDALONE_FILTER) || INTERNAL_DECODER_DTS
dts_state_t* m_dts_state;
#endif
@@ -92,8 +92,9 @@ protected: HRESULT ProcessHdmvLPCM(bool bAlignOldBuffer);
#endif
#if defined(STANDALONE_FILTER) || INTERNAL_DECODER_AC3
- HRESULT ProcessAC3();
- HRESULT ProcessA52(BYTE* p, int buffsize, int& size, bool& fEnoughData);
+ //HRESULT ProcessAC3();
+ //HRESULT ProcessA52(BYTE* p, int buffsize, int& size, bool& fEnoughData);
+ HRESULT ProcessAC3SPDIF();
#endif
#if defined(STANDALONE_FILTER) || INTERNAL_DECODER_DTS
HRESULT ProcessDTS();
diff --git a/src/filters/transform/MpaDecFilter/MpaDecFilter.vcxproj b/src/filters/transform/MpaDecFilter/MpaDecFilter.vcxproj index 3fe11843b..7d661c57c 100644 --- a/src/filters/transform/MpaDecFilter/MpaDecFilter.vcxproj +++ b/src/filters/transform/MpaDecFilter/MpaDecFilter.vcxproj @@ -250,10 +250,6 @@ <Project>{c2082189-3ecb-4079-91fa-89d3c8a305c0}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
- <ProjectReference Include="..\..\..\thirdparty\a52dec\vc++\liba52.vcxproj">
- <Project>{62fe6d94-e17c-4a8e-8d3c-7a589a70d865}</Project>
- <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
- </ProjectReference>
<ProjectReference Include="..\..\..\thirdparty\libdca\vc++\libdca.vcxproj">
<Project>{fae14dbe-b508-4ab3-929d-75c68e4ebbc1}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
diff --git a/src/filters/transform/MpaDecFilter/MpaDecSettingsWnd.cpp b/src/filters/transform/MpaDecFilter/MpaDecSettingsWnd.cpp index 243a7759b..de8debae4 100644 --- a/src/filters/transform/MpaDecFilter/MpaDecSettingsWnd.cpp +++ b/src/filters/transform/MpaDecFilter/MpaDecSettingsWnd.cpp @@ -119,20 +119,20 @@ bool CMpaDecSettingsWnd::OnActivate() p.y += m_fontheight + 5;
- m_ac3spkcfg_combo.Create(dwStyle | CBS_DROPDOWNLIST, CRect(p + CSize(150, 0), CSize(100, 200)), this, IDC_PP_COMBO2);
- m_ac3spkcfg_combo.SetItemData(m_ac3spkcfg_combo.AddString(_T("Mono")), A52_MONO);
- m_ac3spkcfg_combo.SetItemData(m_ac3spkcfg_combo.AddString(_T("Dual Mono")), A52_CHANNEL);
- m_ac3spkcfg_combo.SetItemData(m_ac3spkcfg_combo.AddString(_T("Stereo")), A52_STEREO);
- m_ac3spkcfg_combo.SetItemData(m_ac3spkcfg_combo.AddString(_T("Dolby Stereo")), A52_DOLBY);
- m_ac3spkcfg_combo.SetItemData(m_ac3spkcfg_combo.AddString(ResStr(IDS_MPA_3F)), A52_3F);
- m_ac3spkcfg_combo.SetItemData(m_ac3spkcfg_combo.AddString(ResStr(IDS_MPA_2F_1R)), A52_2F1R);
- m_ac3spkcfg_combo.SetItemData(m_ac3spkcfg_combo.AddString(ResStr(IDS_MPA_3F_1R)), A52_3F1R);
- m_ac3spkcfg_combo.SetItemData(m_ac3spkcfg_combo.AddString(ResStr(IDS_MPA_2F_2R)), A52_2F2R);
- m_ac3spkcfg_combo.SetItemData(m_ac3spkcfg_combo.AddString(ResStr(IDS_MPA_3F_2R)), A52_3F2R);
- m_ac3spkcfg_combo.SetItemData(m_ac3spkcfg_combo.AddString(ResStr(IDS_MPA_CHANNEL_1)), A52_CHANNEL1);
- m_ac3spkcfg_combo.SetItemData(m_ac3spkcfg_combo.AddString(ResStr(IDS_MPA_CHANNEL_2)), A52_CHANNEL2);
-
- for (int i = 0, sel = abs(m_ac3spkcfg) & A52_CHANNEL_MASK; i < m_ac3spkcfg_combo.GetCount(); i++)
+ m_ac3spkcfg_combo.Create(dwStyle | WS_DISABLED | CBS_DROPDOWNLIST, CRect(p + CSize(150, 0), CSize(100, 200)), this, IDC_PP_COMBO2);
+ m_ac3spkcfg_combo.SetItemData(m_ac3spkcfg_combo.AddString(_T("Mono")), /*A52_MONO*/1);
+ m_ac3spkcfg_combo.SetItemData(m_ac3spkcfg_combo.AddString(_T("Dual Mono")), /*A52_CHANNEL*/0);
+ m_ac3spkcfg_combo.SetItemData(m_ac3spkcfg_combo.AddString(_T("Stereo")), /*A52_STEREO*/2);
+ m_ac3spkcfg_combo.SetItemData(m_ac3spkcfg_combo.AddString(_T("Dolby Stereo")), /*A52_DOLBY*/10);
+ m_ac3spkcfg_combo.SetItemData(m_ac3spkcfg_combo.AddString(ResStr(IDS_MPA_3F)), /*A52_3F*/3);
+ m_ac3spkcfg_combo.SetItemData(m_ac3spkcfg_combo.AddString(ResStr(IDS_MPA_2F_1R)), /*A52_2F1R*/4);
+ m_ac3spkcfg_combo.SetItemData(m_ac3spkcfg_combo.AddString(ResStr(IDS_MPA_3F_1R)), /*A52_3F1R*/5);
+ m_ac3spkcfg_combo.SetItemData(m_ac3spkcfg_combo.AddString(ResStr(IDS_MPA_2F_2R)), /*A52_2F2R*/6);
+ m_ac3spkcfg_combo.SetItemData(m_ac3spkcfg_combo.AddString(ResStr(IDS_MPA_3F_2R)), /*A52_3F2R*/7);
+ m_ac3spkcfg_combo.SetItemData(m_ac3spkcfg_combo.AddString(ResStr(IDS_MPA_CHANNEL_1)), /*A52_CHANNEL1*/8);
+ m_ac3spkcfg_combo.SetItemData(m_ac3spkcfg_combo.AddString(ResStr(IDS_MPA_CHANNEL_2)), /*A52_CHANNEL2*/9);
+
+ for (int i = 0, sel = abs(m_ac3spkcfg) & /*A52_CHANNEL_MASK*/15; i < m_ac3spkcfg_combo.GetCount(); i++)
if ((int)m_ac3spkcfg_combo.GetItemData(i) == sel) {
m_ac3spkcfg_combo.SetCurSel(i);
}
@@ -140,8 +140,8 @@ bool CMpaDecSettingsWnd::OnActivate() m_ac3spkcfg_combo.GetWindowRect(r);
ScreenToClient(r);
- m_ac3lfe_check.Create(_T("LFE"), dwStyle | BS_AUTOCHECKBOX, CRect(CPoint(r.left, r.bottom + 3), CSize(50, m_fontheight)), this, IDC_PP_CHECK4);
- m_ac3lfe_check.SetCheck(!!(abs(m_ac3spkcfg) & A52_LFE));
+ m_ac3lfe_check.Create(_T("LFE"), dwStyle | WS_DISABLED | BS_AUTOCHECKBOX, CRect(CPoint(r.left, r.bottom + 3), CSize(50, m_fontheight)), this, IDC_PP_CHECK4);
+ m_ac3lfe_check.SetCheck(!!(abs(m_ac3spkcfg) & /*A52_LFE*/16));
for (int i = 0, h = max(20, m_fontheight) + 1; i < _countof(m_ac3spkcfg_radio); i++, p.y += h) {
static const TCHAR* labels[] = {m_strDecodeToSpeaker, _T("SPDIF")};
@@ -208,7 +208,7 @@ void CMpaDecSettingsWnd::OnDeactivate() m_outputformat = (int)m_outputformat_combo.GetItemData(m_outputformat_combo.GetCurSel());
m_ac3spkcfg = (int)m_ac3spkcfg_combo.GetItemData(m_ac3spkcfg_combo.GetCurSel());
if (!!m_ac3lfe_check.GetCheck()) {
- m_ac3spkcfg |= A52_LFE;
+ m_ac3spkcfg |= /*A52_LFE*/16;
}
if (IsDlgButtonChecked(IDC_PP_RADIO2)) {
m_ac3spkcfg = -m_ac3spkcfg;
diff --git a/src/mpc-hc/PPageInternalFilters.cpp b/src/mpc-hc/PPageInternalFilters.cpp index 66fec0098..2b4d61763 100644 --- a/src/mpc-hc/PPageInternalFilters.cpp +++ b/src/mpc-hc/PPageInternalFilters.cpp @@ -86,7 +86,7 @@ static filter_t s_filters[] = { {_T("AAC"), DECODER, TRA_AAC, IDS_TRA_FFMPEG, CreateInstance<CMpaDecFilter>},
#endif
#if INTERNAL_DECODER_AC3
- {_T("AC3/E-AC3/TrueHD/MLP"), DECODER, TRA_AC3, IDS_TRA_AC3, CreateInstance<CMpaDecFilter>},
+ {_T("AC3/E-AC3/TrueHD/MLP"), DECODER, TRA_AC3, IDS_TRA_FFMPEG, CreateInstance<CMpaDecFilter>},
#endif
#if INTERNAL_DECODER_DTS
{_T("DTS"), DECODER, TRA_DTS, IDS_TRA_DTS, CreateInstance<CMpaDecFilter>},
diff --git a/src/mpc-hc/mpc-hc.vcxproj b/src/mpc-hc/mpc-hc.vcxproj index 0f6da1274..672cf39a6 100644 --- a/src/mpc-hc/mpc-hc.vcxproj +++ b/src/mpc-hc/mpc-hc.vcxproj @@ -708,10 +708,6 @@ <Project>{5e56335f-0fb1-4eea-b240-d8dc5e0608e4}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
- <ProjectReference Include="..\thirdparty\a52dec\vc++\liba52.vcxproj">
- <Project>{62fe6d94-e17c-4a8e-8d3c-7a589a70d865}</Project>
- <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
- </ProjectReference>
<ProjectReference Include="..\thirdparty\lcms2\lcms2.vcxproj">
<Project>{acf5c64b-78aa-4730-91a2-24f4910fbad9}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
|