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

github.com/mpc-hc/LAVFilters.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUnderground78 <underground78@users.sourceforge.net>2013-09-28 19:30:14 +0400
committerUnderground78 <underground78@users.sourceforge.net>2014-06-03 23:44:06 +0400
commitdf78d4f94c9052e75f03c8a6c3e33d1d4f97a8fb (patch)
tree13237e7bdc0dc28b58d29b4f869e4fc07e9a34c7 /demuxer
parent3ff3dfb49712b9db21f3171fc845f16981863d35 (diff)
[MPC-HC] Tray icon: Add an optional custom callback for "show property page" events.
Diffstat (limited to 'demuxer')
-rw-r--r--demuxer/LAVSplitter/LAVSplitter.cpp11
-rw-r--r--demuxer/LAVSplitter/LAVSplitter.h5
2 files changed, 16 insertions, 0 deletions
diff --git a/demuxer/LAVSplitter/LAVSplitter.cpp b/demuxer/LAVSplitter/LAVSplitter.cpp
index fde78d6a..b47b33f8 100644
--- a/demuxer/LAVSplitter/LAVSplitter.cpp
+++ b/demuxer/LAVSplitter/LAVSplitter.cpp
@@ -115,6 +115,7 @@ STDMETHODIMP CLAVSplitter::CreateTrayIcon()
if (CBaseTrayIcon::ProcessBlackList())
return S_FALSE;
m_pTrayIcon = new CLAVSplitterTrayIcon(this, TEXT(LAV_SPLITTER), IDI_ICON1);
+ m_pTrayIcon->SetCustomOpenPropPage(m_fpPropPageCallback);
return S_OK;
}
@@ -309,6 +310,7 @@ STDMETHODIMP CLAVSplitter::NonDelegatingQueryInterface(REFIID riid, void** ppv)
QI(ISpecifyPropertyPages2)
QI2(ILAVFSettings)
QI2(ILAVFSettingsInternal)
+ QI2(ILAVFSettingsMPCHCCustom)
QI(IObjectWithSite)
QI(IBufferInfo)
__super::NonDelegatingQueryInterface(riid, ppv);
@@ -1824,6 +1826,15 @@ STDMETHODIMP_(std::set<FormatInfo>&) CLAVSplitter::GetInputFormats()
return m_InputFormats;
}
+// ILAVFSettingsMPCHCCustom
+STDMETHODIMP CLAVSplitter::SetPropertyPageCallback(HRESULT (*fpPropPageCallback)(IBaseFilter* pFilter))
+{
+ m_fpPropPageCallback = fpPropPageCallback;
+ if (m_pTrayIcon)
+ m_pTrayIcon->SetCustomOpenPropPage(fpPropPageCallback);
+ return S_OK;
+}
+
CLAVSplitterSource::CLAVSplitterSource(LPUNKNOWN pUnk, HRESULT* phr)
: CLAVSplitter(pUnk, phr)
{
diff --git a/demuxer/LAVSplitter/LAVSplitter.h b/demuxer/LAVSplitter/LAVSplitter.h
index 21cca8f6..935691f2 100644
--- a/demuxer/LAVSplitter/LAVSplitter.h
+++ b/demuxer/LAVSplitter/LAVSplitter.h
@@ -62,6 +62,7 @@ class CLAVSplitter
, public IAMStreamSelect
, public IAMOpenProgress
, public ILAVFSettingsInternal
+ , public ILAVFSettingsMPCHCCustom
, public ISpecifyPropertyPages2
, public IObjectWithSite
, public IBufferInfo
@@ -174,6 +175,9 @@ public:
STDMETHODIMP SetNetworkStreamAnalysisDuration(DWORD dwDuration);
STDMETHODIMP_(DWORD) GetNetworkStreamAnalysisDuration();
+ // ILAVFSettingsMPCHCCustom
+ STDMETHODIMP SetPropertyPageCallback(HRESULT (*fpPropPageCallback)(IBaseFilter* pFilter));
+
// ILAVSplitterSettingsInternal
STDMETHODIMP_(LPCSTR) GetInputFormat() { if (m_pDemuxer) return m_pDemuxer->GetContainerFormat(); return nullptr; }
STDMETHODIMP_(std::set<FormatInfo>&) GetInputFormats();
@@ -295,6 +299,7 @@ private:
IUnknown *m_pSite = nullptr;
CBaseTrayIcon *m_pTrayIcon = nullptr;
+ HRESULT (*m_fpPropPageCallback)(IBaseFilter* pFilter) = nullptr;
};
[uuid("B98D13E7-55DB-4385-A33D-09FD1BA26338")]