diff options
author | Casimir666 <casimir666@users.sourceforge.net> | 2007-10-11 00:26:19 +0400 |
---|---|---|
committer | Casimir666 <casimir666@users.sourceforge.net> | 2007-10-11 00:26:19 +0400 |
commit | bbd8b21af24e7586645b72e5d382a43d82f7d30a (patch) | |
tree | 919d42c6fdd37f170631db8bd6df4981c5197aac /src/filters/PinInfoWnd.cpp | |
parent | f61f785ee8b0889e37189d9945239233b79a9bc3 (diff) |
Filter name added in pin property (useful to find source filter name)
git-svn-id: https://mpc-hc.svn.sourceforge.net/svnroot/mpc-hc/trunk@306 10f7b99b-c216-0410-bff0-8a66a9350fd8
Diffstat (limited to 'src/filters/PinInfoWnd.cpp')
-rw-r--r-- | src/filters/PinInfoWnd.cpp | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/src/filters/PinInfoWnd.cpp b/src/filters/PinInfoWnd.cpp index fedaa7493..cad7e9d32 100644 --- a/src/filters/PinInfoWnd.cpp +++ b/src/filters/PinInfoWnd.cpp @@ -125,6 +125,34 @@ void CPinInfoWnd::OnCbnSelchangeCombo1() CString str;
+ PIN_INFO PinInfo;
+ if (SUCCEEDED (pPin->QueryPinInfo(&PinInfo)))
+ {
+ CString strName;
+ CLSID FilterClsid;
+ FILTER_INFO FilterInfo;
+
+ if (SUCCEEDED (PinInfo.pFilter->QueryFilterInfo (&FilterInfo)))
+ {
+ CRegKey key;
+ PinInfo.pFilter->GetClassID(&FilterClsid);
+ if (ERROR_SUCCESS == key.Open (HKEY_CLASSES_ROOT, _T("CLSID\\{083863F1-70DE-11D0-BD40-00A0C911CE86}\\Instance\\") + CStringFromGUID(FilterClsid), KEY_READ))
+ {
+ ULONG len;
+ TCHAR buff[128];
+ len = countof(buff);
+ key.QueryStringValue(_T("FriendlyName"), buff, &len);
+ strName = CString (buff);
+ }
+ else
+ strName = FilterInfo.achName;
+ str.Format (_T("Filter : %s - CLSID : %s\n\n"), strName, CStringFromGUID(FilterClsid));
+ AddLine(str);
+ FilterInfo.pGraph->Release();
+ }
+ PinInfo.pFilter->Release();
+ }
+
CMediaTypeEx cmt;
CComPtr<IPin> pPinTo;
|