Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mpc-hc/rarfilesource.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArmada <jules.blok@gmail.com>2013-02-02 03:18:53 +0400
committerArmada <jules.blok@gmail.com>2013-08-13 22:42:14 +0400
commit29ba6b5d061d92c74be1923c24bf7b3325164c5b (patch)
tree4a4fc93600caa96d47bd4552c9ac24a7382a50f3
parent1b1f98efe0d6f9585f744da406e234598b88a1eb (diff)
Add custom code for MPC-HC compatibility.1.7.0-1
-rw-r--r--RFS.cpp15
-rw-r--r--RFS.rc4
-rw-r--r--Utils.cpp2
-rw-r--r--resource.h2
4 files changed, 21 insertions, 2 deletions
diff --git a/RFS.cpp b/RFS.cpp
index fbbb85b..62ef158 100644
--- a/RFS.cpp
+++ b/RFS.cpp
@@ -17,7 +17,9 @@
#include <windows.h>
#include <streams.h>
+#ifdef STANDALONE_FILTER
#include <initguid.h>
+#endif
#include <strsafe.h>
#include "RFS.h"
@@ -36,6 +38,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 =
{
@@ -62,7 +66,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.
@@ -80,6 +85,7 @@ CFactoryTemplate g_Templates [] =
int g_cTemplates = sizeof (g_Templates) / sizeof (g_Templates [0]);
+#endif
/* static */
file_type_t CRARFileSource::s_file_types [] =
@@ -100,6 +106,7 @@ file_type_t CRARFileSource::s_file_types [] =
{ NULL, NULL }
};
+#ifdef STANDALONE_FILTER
extern "C" BOOL WINAPI DllEntryPoint (HINSTANCE, ULONG, LPVOID);
@@ -198,6 +205,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),
@@ -822,7 +831,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)
{
diff --git a/RFS.rc b/RFS.rc
index 38c45a0..eda41f7 100644
--- a/RFS.rc
+++ b/RFS.rc
@@ -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
diff --git a/Utils.cpp b/Utils.cpp
index 9bdea51..b54492b 100644
--- a/Utils.cpp
+++ b/Utils.cpp
@@ -46,7 +46,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
diff --git a/resource.h b/resource.h
index 7015f1e..7bdeb26 100644
--- a/resource.h
+++ b/resource.h
@@ -2,4 +2,4 @@
#define IDOK 1
#define IDCANCEL 2
#define IDC_FILELIST 1000
-#define IDD_FILELIST 2000
+#define IDD_FILELIST 10057