diff options
author | Armada <jules.blok@gmail.com> | 2013-02-02 03:18:53 +0400 |
---|---|---|
committer | Armada <jules.blok@gmail.com> | 2013-02-12 02:05:56 +0400 |
commit | 59e45130f0f1d3145795cdd94e7dd028da077a01 (patch) | |
tree | a1214bef730865e7765f043abd83ac707fe5cfe3 | |
parent | f56d14a4049181c1cf3e444150feac90c2717397 (diff) |
Add custom code for MPC-HC compatibility.1.6.6-1
-rw-r--r-- | RFS.cpp | 15 | ||||
-rw-r--r-- | RFS.rc | 4 | ||||
-rw-r--r-- | Utils.cpp | 2 | ||||
-rw-r--r-- | resource.h | 2 |
4 files changed, 21 insertions, 2 deletions
@@ -16,7 +16,9 @@ #include <windows.h> #include <streams.h> +#ifdef STANDALONE_FILTER #include <initguid.h> +#endif #include <strsafe.h> #include "RFS.h" @@ -35,6 +37,8 @@ DEFINE_GUID(MEDIASUBTYPE_Matroska, 0x1AC0BEBD, 0x4D2B, 0x45AD, 0xBC, 0xEB, 0xF2, 0xC4, 0x1C, 0x5E, 0x37, 0x88); +#ifdef STANDALONE_FILTER + // Setup information const AMOVIESETUP_MEDIATYPE sudPinTypes = { @@ -61,7 +65,8 @@ const AMOVIESETUP_FILTER sudRARFileSource = RARFileSourceName, // Filter name MERIT_UNLIKELY, // Filter merit 1, // Number of pins - &sudpPin // Pin information + &sudpPin, // Pin information + CLSID_LegacyAmFilterCategory }; // List of class IDs and creator functions for the class factory. @@ -79,6 +84,7 @@ CFactoryTemplate g_Templates [] = int g_cTemplates = sizeof (g_Templates) / sizeof (g_Templates [0]); +#endif /* static */ file_type_t CRARFileSource::s_file_types [] = @@ -99,6 +105,7 @@ file_type_t CRARFileSource::s_file_types [] = { NULL, NULL } }; +#ifdef STANDALONE_FILTER extern "C" BOOL WINAPI DllEntryPoint (HINSTANCE, ULONG, LPVOID); @@ -197,6 +204,8 @@ STDAPI DllUnregisterServer () return AMovieDllRegisterServer2 (FALSE); } +#endif + CRARFileSource::CRARFileSource (LPUNKNOWN punk, HRESULT *phr) : CBaseFilter (RARFileSourceName, punk, &m_lock, __uuidof(CRARFileSource)), m_pin (this, &m_lock, phr), @@ -821,7 +830,11 @@ STDMETHODIMP CRARFileSource::Load (LPCOLESTR lpwszFileName, const AM_MEDIA_TYPE } else { +#ifdef STANDALONE_FILTER m_file = (CRFSFile *) DialogBoxParam (g_hInst, MAKEINTRESOURCE(IDD_FILELIST), 0, DlgFileList, (LPARAM) &file_list); +#else + m_file = (CRFSFile *) DialogBoxParam (GetModuleHandle(NULL), MAKEINTRESOURCE(IDD_FILELIST), 0, DlgFileList, (LPARAM) &file_list); +#endif if (!m_file) { @@ -7,6 +7,8 @@ // Version // +#ifdef STANDALONE_FILTER + VS_VERSION_INFO VERSIONINFO FILEVERSION 0,9,3,0 PRODUCTVERSION 0,9,3,0 @@ -42,6 +44,8 @@ BEGIN END END +#endif + ///////////////////////////////////////////////////////////////////////////// // // Dialog @@ -45,7 +45,9 @@ void ErrorMsg (DWORD errorCode, wchar_t *format, ...) } DbgLog((LOG_ERROR, 0, L"%s", buffer)); +#ifdef STANDALONE_FILTER MessageBox (NULL, buffer, RARFileSourceName, MB_OK | MB_ICONERROR); +#endif } #ifdef _DEBUG @@ -2,4 +2,4 @@ #define IDOK 1 #define IDCANCEL 2 #define IDC_FILELIST 1000 -#define IDD_FILELIST 2000 +#define IDD_FILELIST 10057 |