{"id":1100,"date":"2009-12-24T15:07:50","date_gmt":"2009-12-24T13:07:50","guid":{"rendered":"https:\/\/alax.info\/blog\/?p=1100"},"modified":"2011-03-07T20:09:49","modified_gmt":"2011-03-07T18:09:49","slug":"directshow-spy-filter-mapper-spy","status":"publish","type":"post","link":"https:\/\/alax.info\/blog\/1100","title":{"rendered":"DirectShow Spy: Filter Mapper Spy"},"content":{"rendered":"<p><a href=\"https:\/\/alax.info\/blog\/777\">DirectShow Filter Graph Spy<\/a> was updated to add new functionality: spying over another DirectShow object &#8211; <a href=\"http:\/\/msdn.microsoft.com\/en-us\/library\/dd375788%28VS.85%29.aspx\">Filter Mapper<\/a>. Filter Mapper object is used for filter registration purposes and also internally by DirectShow&#8217;s <a href=\"http:\/\/msdn.microsoft.com\/en-us\/library\/ms940065.aspx\">Intelligent Connect<\/a>. <a href=\"http:\/\/msdn.microsoft.com\/en-us\/library\/dd390033%28VS.85%29.aspx\">IFilterMapper2<\/a> interface traces provide detailed description on steps DirectShow takes in order to connect and\/or render filter pins. For example when trying to render <em>MEDIATYPE_Audio<\/em> pin, Filter Mapper suggested &#8220;RDP DShow Redirection Filter&#8221; and, then, &#8220;Default DirectSound Device&#8221;:<\/p>\n<pre style=\"background: #ffffff none repeat scroll 0% 0%; color: #000000;\">FilterMapperSpy<span style=\"color: #008c00;\">.<\/span>h<span style=\"color: #808030;\">(<\/span><span style=\"color: #008c00;\">186<\/span><span style=\"color: #808030;\">)<\/span><span style=\"color: #808030;\">:<\/span> CFilterMapperSpy<span style=\"color: #808030;\">:<\/span><span style=\"color: #808030;\">:<\/span>EnumMatchingFilters<span style=\"color: #808030;\">:<\/span> nFlags 0x0<span style=\"color: #808030;\">,<\/span> bExactMatch <span style=\"color: #008c00;\">0<\/span><span style=\"color: #808030;\">,<\/span> nMinimalMerit 0x00200001<span style=\"color: #808030;\">,<\/span> bInputNeeded <span style=\"color: #008c00;\">1<\/span><span style=\"color: #808030;\">,<\/span> nInputTypeCount <span style=\"color: #008c00;\">1<\/span><span style=\"color: #808030;\">,<\/span> pInputPinCategory NULL<span style=\"color: #808030;\">,<\/span> bRender <span style=\"color: #008c00;\">1<\/span><span style=\"color: #808030;\">,<\/span> bOutputNeeded <span style=\"color: #008c00;\">0<\/span><span style=\"color: #808030;\">,<\/span> nOutputTypeCount <span style=\"color: #008c00;\">0<\/span><span style=\"color: #808030;\">,<\/span> pOutputPinCategory NULL\r\nFilterMapperSpy<span style=\"color: #008c00;\">.<\/span>h<span style=\"color: #808030;\">(<\/span><span style=\"color: #008c00;\">191<\/span><span style=\"color: #808030;\">)<\/span><span style=\"color: #808030;\">:<\/span> CFilterMapperSpy<span style=\"color: #808030;\">:<\/span><span style=\"color: #808030;\">:<\/span>EnumMatchingFilters<span style=\"color: #808030;\">:<\/span> nInputTypeIndex <span style=\"color: #008c00;\">0<\/span><span style=\"color: #808030;\">,<\/span> MajorType <span style=\"color: #808030;\">{<\/span><span style=\"color: #008c00;\">73647561<\/span><span style=\"color: #808030;\">-<\/span><span style=\"color: #008c00;\">0000<\/span><span style=\"color: #808030;\">-<\/span><span style=\"color: #008c00;\">0010<\/span><span style=\"color: #808030;\">-<\/span><span style=\"color: #008c00;\">8000<\/span><span style=\"color: #808030;\">-<\/span>00AA00389B71<span style=\"color: #808030;\">}<\/span><span style=\"color: #808030;\">,<\/span> Subtype <span style=\"color: #808030;\">{<\/span><span style=\"color: #008c00;\">00000000<\/span><span style=\"color: #808030;\">-<\/span><span style=\"color: #008c00;\">0000<\/span><span style=\"color: #808030;\">-<\/span><span style=\"color: #008c00;\">0000<\/span><span style=\"color: #808030;\">-<\/span><span style=\"color: #008c00;\">0000<\/span><span style=\"color: #808030;\">-<\/span><span style=\"color: #008c00;\">000000000000<\/span><span style=\"color: #808030;\">}<\/span>\r\nFilterMapperSpy<span style=\"color: #008c00;\">.<\/span>h<span style=\"color: #808030;\">(<\/span><span style=\"color: #008c00;\">212<\/span><span style=\"color: #808030;\">)<\/span><span style=\"color: #808030;\">:<\/span> CFilterMapperSpy<span style=\"color: #808030;\">:<\/span><span style=\"color: #808030;\">:<\/span>EnumMatchingFilters<span style=\"color: #808030;\">:<\/span> pMoniker @device<span style=\"color: #808030;\">:<\/span>sw<span style=\"color: #808030;\">:<\/span><span style=\"color: #808030;\">{<\/span>083863F1<span style=\"color: #808030;\">-<\/span>70DE<span style=\"color: #808030;\">-<\/span>11D0<span style=\"color: #808030;\">-<\/span>BD40<span style=\"color: #808030;\">-<\/span>00A0C911CE86<span style=\"color: #808030;\">}<\/span><span style=\"color: #808030;\">\\<\/span><span style=\"color: #808030;\">{<\/span>AB9D6472<span style=\"color: #808030;\">-<\/span>752F<span style=\"color: #808030;\">-<\/span>43F6<span style=\"color: #808030;\">-<\/span>B29E<span style=\"color: #808030;\">-<\/span>61207BDA8E06<span style=\"color: #808030;\">}<\/span>\r\nFilterMapperSpy<span style=\"color: #008c00;\">.<\/span>h<span style=\"color: #808030;\">(<\/span><span style=\"color: #008c00;\">220<\/span><span style=\"color: #808030;\">)<\/span><span style=\"color: #808030;\">:<\/span> CFilterMapperSpy<span style=\"color: #808030;\">:<\/span><span style=\"color: #808030;\">:<\/span>EnumMatchingFilters<span style=\"color: #808030;\">:<\/span> sFriendlyName <span style=\"color: #800000;\">\"<\/span><span style=\"color: #0000e6;\">RDP DShow Redirection Filter<\/span><span style=\"color: #800000;\">\"<\/span><span style=\"color: #808030;\">,<\/span> sDescription <span style=\"color: #800000;\">\"<\/span><span style=\"color: #800000;\">\"<\/span><span style=\"color: #808030;\">,<\/span> sDevicePath <span style=\"color: #800000;\">\"<\/span><span style=\"color: #800000;\">\"<\/span>\r\nFilterMapperSpy<span style=\"color: #008c00;\">.<\/span>h<span style=\"color: #808030;\">(<\/span><span style=\"color: #008c00;\">212<\/span><span style=\"color: #808030;\">)<\/span><span style=\"color: #808030;\">:<\/span> CFilterMapperSpy<span style=\"color: #808030;\">:<\/span><span style=\"color: #808030;\">:<\/span>EnumMatchingFilters<span style=\"color: #808030;\">:<\/span> pMoniker @device<span style=\"color: #808030;\">:<\/span>cm<span style=\"color: #808030;\">:<\/span><span style=\"color: #808030;\">{<\/span>E0F158E1<span style=\"color: #808030;\">-<\/span>CB04<span style=\"color: #808030;\">-<\/span>11D0<span style=\"color: #808030;\">-<\/span>BD4E<span style=\"color: #808030;\">-<\/span>00A0C911CE86<span style=\"color: #808030;\">}<\/span><span style=\"color: #808030;\">\\<\/span>Default DirectSound Device\r\nFilterMapperSpy<span style=\"color: #008c00;\">.<\/span>h<span style=\"color: #808030;\">(<\/span><span style=\"color: #008c00;\">220<\/span><span style=\"color: #808030;\">)<\/span><span style=\"color: #808030;\">:<\/span> CFilterMapperSpy<span style=\"color: #808030;\">:<\/span><span style=\"color: #808030;\">:<\/span>EnumMatchingFilters<span style=\"color: #808030;\">:<\/span> sFriendlyName <span style=\"color: #800000;\">\"<\/span><span style=\"color: #0000e6;\">Default DirectSound Device<\/span><span style=\"color: #800000;\">\"<\/span><span style=\"color: #808030;\">,<\/span> sDescription <span style=\"color: #800000;\">\"<\/span><span style=\"color: #800000;\">\"<\/span><span style=\"color: #808030;\">,<\/span> sDevicePath <span style=\"color: #800000;\">\"<\/span><span style=\"color: #800000;\">\"<\/span><\/pre>\n<p>Important is that DirectShow&#8217;s internals are using the mapper through COM instantiation and this provides a safe method to override default behavior process wide in order to, for example, extend <a href=\"http:\/\/msdn.microsoft.com\/en-us\/library\/ms940065.aspx\">Intelligent Connect<\/a> functionality onto custom, unregistered globally, private filters.<\/p>\n<p>Also, the binary is renamed from FilterGraphSpy.dll to DirectShowSpy.dll.<\/p>\n<p>Partial Visual C++ .NET 2008 source code is <a href=\"http:\/\/www.assembla.com\/code\/roatl-utilities\/subversion\/nodes\/trunk\/FilterGraphSpy\">available from SVN<\/a>, release binary included (<a href=\"http:\/\/www.assembla.com\/code\/roatl-utilities\/subversion\/nodes\/trunk\/FilterGraphSpy\/Release%20Trace\/Win32\/DirectShowSpy.dll?format=raw\">Win32<\/a>, <a href=\"http:\/\/www.assembla.com\/code\/roatl-utilities\/subversion\/nodes\/trunk\/FilterGraphSpy\/Release%20Trace\/x64\/DirectShowSpy.dll?format=raw\">x64<\/a>); installation instructions are in <a href=\".\/777\">another post<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>DirectShow Filter Graph Spy was updated to add new functionality: spying over another DirectShow object &#8211; Filter Mapper. Filter Mapper object is used for filter registration purposes and also internally by DirectShow&#8217;s Intelligent Connect. IFilterMapper2 interface traces provide detailed description on steps DirectShow takes in order to connect and\/or render filter pins. For example when&hellip; <\/p>\n<p><a class=\"moretag\" href=\"https:\/\/alax.info\/blog\/1100\">Read the full article<\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6,13,12,10],"tags":[78,119,163,282,285,164],"class_list":["post-1100","post","type-post","status-publish","format-standard","hentry","category-audio","category-source","category-technology","category-video","tag-directshow","tag-filter","tag-graph","tag-hook","tag-mapper","tag-spy"],"_links":{"self":[{"href":"https:\/\/alax.info\/blog\/wp-json\/wp\/v2\/posts\/1100","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/alax.info\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/alax.info\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/alax.info\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/alax.info\/blog\/wp-json\/wp\/v2\/comments?post=1100"}],"version-history":[{"count":0,"href":"https:\/\/alax.info\/blog\/wp-json\/wp\/v2\/posts\/1100\/revisions"}],"wp:attachment":[{"href":"https:\/\/alax.info\/blog\/wp-json\/wp\/v2\/media?parent=1100"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/alax.info\/blog\/wp-json\/wp\/v2\/categories?post=1100"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/alax.info\/blog\/wp-json\/wp\/v2\/tags?post=1100"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}