<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>tanvon++</title>
	<atom:link href="http://tanvon.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://tanvon.wordpress.com</link>
	<description>tanvon DirectShow VC++</description>
	<lastBuildDate>Sat, 27 Sep 2008 10:30:29 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<cloud domain='tanvon.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://www.gravatar.com/blavatar/6a8d78b2d01d22cc1213f6de88993252?s=96&#038;d=http://s.wordpress.com/i/buttonw-com.png</url>
		<title>tanvon++</title>
		<link>http://tanvon.wordpress.com</link>
	</image>
			<item>
		<title>Inserting a DMO in the DirectShow Filter Graph</title>
		<link>http://tanvon.wordpress.com/2008/09/27/inserting-a-dmo-in-the-directshow-filter-graph/</link>
		<comments>http://tanvon.wordpress.com/2008/09/27/inserting-a-dmo-in-the-directshow-filter-graph/#comments</comments>
		<pubDate>Sat, 27 Sep 2008 10:30:29 +0000</pubDate>
		<dc:creator>tanvon malik</dc:creator>
				<category><![CDATA[DMO]]></category>
		<category><![CDATA[DirectShow]]></category>
		<category><![CDATA[System Device Enumerator]]></category>

		<guid isPermaLink="false">http://tanvon.wordpress.com/2008/09/27/inserting-a-dmo-in-the-directshow-filter-graph/</guid>
		<description><![CDATA[DirectX Media Objects (DMO) can be thought as light weight DirectShow filter with limited functionality, But are easier to develop, mostly used for audio video effects.
DMOs can be inserted in a filter graph through a wrapper filter, after DMOs insertion in the filter graph it is treated like a normal filter.
A DMO is a COM [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=tanvon.wordpress.com&blog=410313&post=69&subd=tanvon&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>DirectX Media Objects (DMO) can be thought as light weight DirectShow filter with limited functionality, But are easier to develop, mostly used for audio video effects.</p>
<p>DMOs can be inserted in a filter graph through a wrapper filter, after DMOs insertion in the filter graph it is treated like a normal filter.</p>
<p>A DMO is a COM object. So wrapping means it is aggregated by the <strong><a href="http://msdn.microsoft.com/en-us/library/ms783389(VS.85).aspx">DMO Wrapper Filter</a>.</strong></p>
<p>DMO creation sequence is,</p>
<ol>
<li>Call CoCreateInstance to create <strong><a href="http://msdn.microsoft.com/en-us/library/ms783389(VS.85).aspx">DMO Wrapper Filter</a>.</strong>
<li>Query the DMO Wrapper Filter for the <strong><a href="http://msdn.microsoft.com/en-us/library/ms785137(VS.85).aspx">IDMOWrapperFilter</a></strong> interface.
<li>Initialize the required DMO with <strong><a href="http://msdn.microsoft.com/en-us/library/ms785136(VS.85).aspx">IDMOWrapperFilter::Init</a>.</strong></li>
</ol>
<pre class="code"><span style="color:green;">// Create the DMO Wrapper filter.
</span>IBaseFilter *pFilter;
HRESULT hr = CoCreateInstance(CLSID_DMOWrapperFilter, NULL,
    CLSCTX_INPROC_SERVER, IID_IBaseFilter, (<span style="color:blue;">void</span>**)&amp;pFilter);

<span style="color:blue;">if </span>(SUCCEEDED(hr))
{
    <span style="color:green;">// Query for IDMOWrapperFilter.
    </span>IDMOWrapperFilter *pDmoWrapper;
    hr = pFilter-&gt;QueryInterface(IID_IDMOWrapperFilter,
                                                (<span style="color:blue;">void</span>**)&amp;pDmoWrapper);

    <span style="color:blue;">if </span>(SUCCEEDED(hr))
    {
        <span style="color:green;">// Initialize the filter.
        </span>hr = pDmoWrapper-&gt;Init(CLSID_MyDMO, DMOCATEGORY_VIDEO_EFFECT);
        pDmoWrapper-&gt;Release();

        <span style="color:blue;">if </span>(SUCCEEDED(hr))
        {
            <span style="color:green;">// Add the filter to the graph.
            </span>hr = pGraph-&gt;AddFilter(pFilter, L<span style="color:#a31515;">"My DMO"</span>);
        }
    }
    pFilter-&gt;Release();
}
</pre>
<p><strong>Inserting DMO in filter graph through System Device Enumerator</strong></p>
<p>The other way to add a DMO in the filter graph is through System Device Enumerator. The System Device Enumerator can be used to enumerate the DMOs in various categories, and through System Device Enumerator it is easy to instantiate a DMO through <b>IMoniker::BindToObject </b>which automatically creates the DMO Wrapper filter and initializes it with the DMO.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/tanvon.wordpress.com/69/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/tanvon.wordpress.com/69/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/tanvon.wordpress.com/69/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/tanvon.wordpress.com/69/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/tanvon.wordpress.com/69/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/tanvon.wordpress.com/69/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/tanvon.wordpress.com/69/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/tanvon.wordpress.com/69/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/tanvon.wordpress.com/69/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/tanvon.wordpress.com/69/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=tanvon.wordpress.com&blog=410313&post=69&subd=tanvon&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://tanvon.wordpress.com/2008/09/27/inserting-a-dmo-in-the-directshow-filter-graph/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/5aabd5e4a47152ef3de52cff0b219706?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">tanvon malik</media:title>
		</media:content>
	</item>
		<item>
		<title>Enumerating Filters in the Filter Graph</title>
		<link>http://tanvon.wordpress.com/2008/09/27/enumerating-filters-in-the-filter-graph/</link>
		<comments>http://tanvon.wordpress.com/2008/09/27/enumerating-filters-in-the-filter-graph/#comments</comments>
		<pubDate>Sat, 27 Sep 2008 10:17:11 +0000</pubDate>
		<dc:creator>tanvon malik</dc:creator>
				<category><![CDATA[DirectShow]]></category>
		<category><![CDATA[DirectShow Filters]]></category>
		<category><![CDATA[Enum]]></category>
		<category><![CDATA[Filters]]></category>
		<category><![CDATA[Filters Enumeration]]></category>
		<category><![CDATA[Enum Filters]]></category>

		<guid isPermaLink="false">http://tanvon.wordpress.com/2008/09/27/enumerating-filters-in-the-filter-graph/</guid>
		<description><![CDATA[I have posted earlier about enumerating the DirectShow filters registered on a client computer. 
And another post a enumerating the Pins a DirectShow Filter have.
But this time I am posting about enumerating the DirectShow filters in a specific Filter Graph. A DirectShow filter graph can be created in a number of ways, the easiest is [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=tanvon.wordpress.com&blog=410313&post=68&subd=tanvon&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>I have posted earlier about <a href="http://tanvon.wordpress.com/2008/08/30/enumerating-directshow-filters/">enumerating the DirectShow filters registered on a client computer</a>. </p>
<p>And another post a <a href="http://tanvon.wordpress.com/2008/09/07/enumerating-the-directshow-filter-pin/">enumerating the Pins a DirectShow Filter have</a>.</p>
<p>But this time I am posting about enumerating the DirectShow filters in a specific Filter Graph. A DirectShow filter graph can be created in a number of ways, the easiest is through intelligent connect way, just call <strong>IGraphBuilder::RenderFile</strong> on a media file and all the graph will be built for you.</p>
<p>Now after the filter graph built it is not known which filters are inserted in the filter graph by the Filter Graph Manager, the filters in a filter graph can be easily seen through the GraphEdit if you register the filter graph in the Running Object Table (ROT). At the time let us explore the filter graph through the code.</p>
<pre class="code">HRESULT EnumFilters (IFilterGraph *pGraph)
{
    IEnumFilters *pEnum = NULL;
    IBaseFilter *pFilter;
    ULONG cFetched;

    HRESULT hr = pGraph-&gt;EnumFilters(&amp;pEnum);
    <span style="color:blue;">if </span>(FAILED(hr)) <span style="color:blue;">return </span>hr;

    <span style="color:blue;">while</span>(pEnum-&gt;Next(1, &amp;pFilter, &amp;cFetched) == S_OK)
    {
        FILTER_INFO FilterInfo;
        hr = pFilter-&gt;QueryFilterInfo(&amp;FilterInfo);
        <span style="color:blue;">if </span>(FAILED(hr))
        {
            MessageBox(NULL, TEXT(<span style="color:#a31515;">"Could not get the filter info"</span>),
                TEXT(<span style="color:#a31515;">"Error"</span>), MB_OK | MB_ICONERROR);
            <span style="color:blue;">continue</span>;  <span style="color:green;">// Maybe the next one will work.
        </span>}

        MessageBox(NULL, FilterInfo.achName, TEXT(<span style="color:#a31515;">"Filter Name"</span>), MB_OK);
<span style="color:green;">        // The FILTER_INFO structure holds a pointer to the Filter Graph
        // Manager, with a reference count that must be released.
        </span><span style="color:blue;">if </span>(FilterInfo.pGraph != NULL)
        {
            FilterInfo.pGraph-&gt;Release();
        }
        pFilter-&gt;Release();
    }

    pEnum-&gt;Release();
    <span style="color:blue;">return </span>S_OK;
}
</pre>
<p><a href="http://11011.net/software/vspaste"></a></p>
<p>&nbsp;</p>
<p>If you have read few previous posts of this blog then it will not be&nbsp; difficult to understand the code.</p>
<p>The <strong>IFilterGraph::EnumFilters </strong>gives us a enumerator which can be used to enumerate all the filters in the filter graph. The <strong>IBaseFilter::QueryFilterInfo </strong>helps us to know the filter name and wether it is the member of a filter graph or not.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/tanvon.wordpress.com/68/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/tanvon.wordpress.com/68/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/tanvon.wordpress.com/68/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/tanvon.wordpress.com/68/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/tanvon.wordpress.com/68/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/tanvon.wordpress.com/68/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/tanvon.wordpress.com/68/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/tanvon.wordpress.com/68/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/tanvon.wordpress.com/68/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/tanvon.wordpress.com/68/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=tanvon.wordpress.com&blog=410313&post=68&subd=tanvon&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://tanvon.wordpress.com/2008/09/27/enumerating-filters-in-the-filter-graph/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/5aabd5e4a47152ef3de52cff0b219706?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">tanvon malik</media:title>
		</media:content>
	</item>
		<item>
		<title>Enum the backbone of DirectShow Graph Building</title>
		<link>http://tanvon.wordpress.com/2008/09/07/enum-the-backbone-of-directshow-graph-building/</link>
		<comments>http://tanvon.wordpress.com/2008/09/07/enum-the-backbone-of-directshow-graph-building/#comments</comments>
		<pubDate>Sun, 07 Sep 2008 16:32:21 +0000</pubDate>
		<dc:creator>tanvon malik</dc:creator>
				<category><![CDATA[DirectShow]]></category>
		<category><![CDATA[DirectShow Filters]]></category>
		<category><![CDATA[Enum]]></category>
		<category><![CDATA[Filters]]></category>
		<category><![CDATA[Filters Enumeration]]></category>

		<guid isPermaLink="false">http://tanvon.wordpress.com/2008/09/07/enum-the-backbone-of-directshow-graph-building/</guid>
		<description><![CDATA[As a few last post are about enumeration, wether enumerating the Filter Categories or enumerating the filters in those categories or enumerating the filters pins.
Now comes another enumeration related post but this time we will enumerate all the filters in a given graph, this can be useful.

if you want to find some kind of info [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=tanvon.wordpress.com&blog=410313&post=60&subd=tanvon&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>As a few last post are about enumeration, wether enumerating the Filter Categories or enumerating the filters in those categories or enumerating the filters pins.</p>
<p>Now comes another enumeration related post but this time we will enumerate all the filters in a given graph, this can be useful.</p>
<ul>
<li>if you want to find some kind of info about all the filters.
<li>want to find a specific interface but don&#8217;t know which filter implements that interface.
<li>want to release all the filters in the filter graph.</li>
</ul>
<h5>here is the code about finding info about filter</h5>
<pre class="code">HRESULT EnumFilters (IFilterGraph *pGraph)
{
    IEnumFilters *pEnum = NULL;
    IBaseFilter *pFilter;
    ULONG cFetched;

    HRESULT hr = pGraph-&gt;EnumFilters(&amp;pEnum);
    <span style="color:blue;">if </span>(FAILED(hr)) <span style="color:blue;">return </span>hr;

    <span style="color:blue;">while</span>(pEnum-&gt;Next(1, &amp;pFilter, &amp;cFetched) == S_OK)
    {
        FILTER_INFO FilterInfo;
        hr = pFilter-&gt;QueryFilterInfo(&amp;FilterInfo);
        <span style="color:blue;">if </span>(FAILED(hr))
        {
            MessageBox(NULL, TEXT(<span style="color:#a31515;">"Could not get the filter info"</span>),
                TEXT(<span style="color:#a31515;">"Error"</span>), MB_OK | MB_ICONERROR);
            <span style="color:blue;">continue</span>;  <span style="color:green;">// Maybe the next one will work.
        </span>}

<span style="color:blue;">#ifdef </span>UNICODE
        MessageBox(NULL, FilterInfo.achName, TEXT(<span style="color:#a31515;">"Filter Name"</span>), MB_OK);
<span style="color:blue;">#else
        char </span>szName[MAX_FILTER_NAME];
        <span style="color:blue;">int </span>cch = WideCharToMultiByte(CP_ACP, 0, FilterInfo.achName,
            MAX_FILTER_NAME, szName, MAX_FILTER_NAME, 0, 0);
        <span style="color:blue;">if </span>(chh &gt; 0)
            MessageBox(NULL, szName, TEXT(<span style="color:#a31515;">"Filter Name"</span>), MB_OK);
<span style="color:blue;">#endif

        </span><span style="color:green;">// The FILTER_INFO structure holds a pointer to the Filter Graph
        // Manager, with a reference count that must be released.
        </span><span style="color:blue;">if </span>(FilterInfo.pGraph != NULL)
        {
            FilterInfo.pGraph-&gt;Release();
        }
        pFilter-&gt;Release();
    }

    pEnum-&gt;Release();
    <span style="color:blue;">return </span>S_OK;
}
</pre>
<p><a href="http://11011.net/software/vspaste"></a></p>
<h5>here is the code to find a specific interface on a filter </h5>
<pre class="code">HRESULT FindFilterInterface(
    IGraphBuilder *pGraph, <span style="color:green;">// Pointer to the Filter Graph Manager.
    </span>REFGUID iid,           <span style="color:green;">// IID of the interface to retrieve.
    </span><span style="color:blue;">void </span>**ppUnk)          <span style="color:green;">// Receives the interface pointer.
</span>{
    <span style="color:blue;">if </span>(!pGraph || !ppUnk) <span style="color:blue;">return </span>E_POINTER;

    HRESULT hr = E_FAIL;
    IEnumFilters *pEnum = NULL;
    IBaseFilter *pF = NULL;
    <span style="color:blue;">if </span>(FAILED(pGraph-&gt;EnumFilters(&amp;pEnum)))
    {
        <span style="color:blue;">return </span>E_FAIL;
    }
    <span style="color:green;">// Query every filter for the interface.
    </span><span style="color:blue;">while </span>(S_OK == pEnum-&gt;Next(1, &amp;pF, 0))
    {
        hr = pF-&gt;QueryInterface(iid, ppUnk);
        pF-&gt;Release();
        <span style="color:blue;">if </span>(SUCCEEDED(hr))
        {
            <span style="color:blue;">break</span>;
        }
    }
    pEnum-&gt;Release();
    <span style="color:blue;">return </span>hr;
}
</pre>
<p><a href="http://11011.net/software/vspaste"></a></p>
<h5>here is the code which releases all the filters in the DirectShow Filter</h5>
<h5>Graph</h5>
<pre class="code"><span style="color:green;">// Stop the graph.
</span>pControl-&gt;Stop();

<span style="color:green;">// Enumerate the filters in the graph.
</span>IEnumFilters *pEnum = NULL;
HRESULT hr = pGraph-&gt;EnumFilters(&amp;pEnum);
<span style="color:blue;">if </span>(SUCCEEDED(hr))
{
    IBaseFilter *pFilter = NULL;
    <span style="color:blue;">while </span>(S_OK == pEnum-&gt;Next(1, &amp;pFilter, NULL))
     {
         <span style="color:green;">// Remove the filter.
         </span>pGraph-&gt;RemoveFilter(pFilter);
         <span style="color:green;">// Reset the enumerator.
         </span>pEnum-&gt;Reset();
         pFilter-&gt;Release();
    }
    pEnum-&gt;Release();
}
</pre>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/tanvon.wordpress.com/60/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/tanvon.wordpress.com/60/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/tanvon.wordpress.com/60/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/tanvon.wordpress.com/60/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/tanvon.wordpress.com/60/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/tanvon.wordpress.com/60/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/tanvon.wordpress.com/60/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/tanvon.wordpress.com/60/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/tanvon.wordpress.com/60/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/tanvon.wordpress.com/60/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/tanvon.wordpress.com/60/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/tanvon.wordpress.com/60/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=tanvon.wordpress.com&blog=410313&post=60&subd=tanvon&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://tanvon.wordpress.com/2008/09/07/enum-the-backbone-of-directshow-graph-building/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/5aabd5e4a47152ef3de52cff0b219706?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">tanvon malik</media:title>
		</media:content>
	</item>
		<item>
		<title>Enumerating the DirectShow Filter Pin</title>
		<link>http://tanvon.wordpress.com/2008/09/07/enumerating-the-directshow-filter-pin/</link>
		<comments>http://tanvon.wordpress.com/2008/09/07/enumerating-the-directshow-filter-pin/#comments</comments>
		<pubDate>Sun, 07 Sep 2008 13:05:53 +0000</pubDate>
		<dc:creator>tanvon malik</dc:creator>
				<category><![CDATA[DirectShow]]></category>
		<category><![CDATA[DirectShow Filters]]></category>
		<category><![CDATA[Enum]]></category>
		<category><![CDATA[Filters]]></category>
		<category><![CDATA[Filters Enumeration]]></category>
		<category><![CDATA[System Device Enumerator]]></category>
		<category><![CDATA[Intelligent Connect]]></category>

		<guid isPermaLink="false">http://tanvon.wordpress.com/2008/09/07/enumerating-the-directshow-filter-pin/</guid>
		<description><![CDATA[When it comes the time of connecting the DirectShow filters manually in DirectShow Filter Graph, at that time we admire the benefits of the Intelligent Connect. To connect a filter manually we have to built the entire filter graph with coding.
First of all a source filer have to be created the filter graph

IGraphBuilder *  [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=tanvon.wordpress.com&blog=410313&post=59&subd=tanvon&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>When it comes the time of connecting the DirectShow filters manually in DirectShow Filter Graph, at that time we admire the benefits of the <a href="http://msdn.microsoft.com/en-us/library/ms786503(VS.85).aspx">Intelligent Connect</a>. To connect a filter manually we have to built the entire filter graph with coding.</p>
<p>First of all a source filer have to be created the filter graph</p>
<p><a href="http://11011.net/software/vspaste"></a>
<pre class="code"><a href="http://msdn.microsoft.com/en-us/library/ms785794(VS.85).aspx">IGraphBuilder</a> *  pGB;
CoCreateInstance(CLSID_FilterGraph,NULL,
               CLSCTX_INPROC_SERVER,IID_IGraphBuilder,(<span style="color:blue;">void</span>**)&amp;pGB);</pre>
<p><a href="http://11011.net/software/vspaste"></a></p>
<p>then a Source Filter have to be added the filter graph, wether with CoCreateInstance() or with <a href="http://msdn.microsoft.com/en-us/library/ms787752(VS.85).aspx">System Device Enumerator</a>, All filters can&#8217;t be created with CoCreateInstance, Normally the filters which are wrapper to devices have to be created with the <a href="http://msdn.microsoft.com/en-us/library/ms787752(VS.85).aspx">System Device Enumerator</a>. But here a source filter is being added that will read the media data from a file from the disk.</p>
<pre class="code"><a href="http://msdn.microsoft.com/en-us/library/ms784601(VS.85).aspx">IBaseFilter</a> * pSF;
    pGB-&gt;<a href="http://msdn.microsoft.com/en-us/library/ms785792(VS.85).aspx">AddSourceFilter</a>(L<span style="color:#a31515;">"c:\\media\\video\\ruby.avi"</span>, L<span style="color:#a31515;">"Source Filter"</span>,</pre>
<pre class="code">                                                                  &amp;pSF);
    IEnumPins * pEP;
    pSF-&gt;<a href="http://msdn.microsoft.com/en-us/library/ms784599(VS.85).aspx">EnumPins</a>(&amp;pEP);
    IPin * pOutPin;
    <span style="color:blue;">while</span>(pEP-&gt;Next(1,&amp;pOutPin,0) == S_OK)
    {
        <a href="http://msdn.microsoft.com/en-us/library/ms787485(VS.85).aspx">PIN_DIRECTION</a> pDir;
        pOutPin-&gt;QueryDirection(&amp;pDir);
        <span style="color:blue;">if</span>(pDir == PINDIR_OUTPUT)
            <span style="color:blue;">break</span>;<span style="color:green;">// success
        </span>pOutPin-&gt;Release();
    }
    pEP-&gt;Release();</pre>
<p><a href="http://11011.net/software/vspaste"></a><a href="http://11011.net/software/vspaste"></a></p>
<p>Now how to enumerate the pins, <a href="http://msdn.microsoft.com/en-us/library/ms784601(VS.85).aspx">IBaseFilter</a> has a method which makes it easy to enumerate the pins a filter have.</p>
<pre><b>HRESULT <a href="http://msdn.microsoft.com/en-us/library/ms784599(VS.85).aspx">EnumPins</a>(
</b>  <b>IEnumPins</b> <b>**</b><i>ppEnum</i>
<b>);</b>
</pre>
<p>which gives us I<a href="http://msdn.microsoft.com/en-us/library/ms784599(VS.85).aspx">EnumPins</a> interface, with this interface you can easily enumerate the pins a filter have wether these are input pins or output pins. you first call Next then check for the pin direction.</p>
<pre><b>HRESULT <a href="http://msdn.microsoft.com/en-us/library/ms786568(VS.85).aspx">QueryDirection</a>(
</b>  <b>PIN_DIRECTION</b> <b>*</b><i>pPinDir</i>
<b>);</b>
</pre>
<p>For direction checking&nbsp; <a href="http://msdn.microsoft.com/en-us/library/ms786568(VS.85).aspx">QueryDirection</a> is called this method tells us the pin direction.</p>
<p>Now you can call <a href="http://msdn.microsoft.com/en-us/library/ms785795(VS.85).aspx">IGraphBuilder::Render</a> to built the entire graph.</p>
<pre><b>HRESULT <a href="http://msdn.microsoft.com/en-us/library/ms785795(VS.85).aspx">Render</a>(
</b>  <b>IPin</b> <b>*</b><i>ppinOut</i>
<b>);</b>
this method takes the output pin to be rendered.</pre>
<pre>or you can call <a href="http://msdn.microsoft.com/en-us/library/ms785793(VS.85).aspx">IGraphBuilder::Connect</a> to directly connect the </pre>
<pre>output pin to a downstream filters input pin.</pre>
<pre><b>HRESULT <a href="http://msdn.microsoft.com/en-us/library/ms785793(VS.85).aspx">Connect</a>(
</b>  <b>IPin</b> <b>*</b><i>ppinOut</i><b>,</b>
  <b>IPin</b> <b>*</b><i>ppinIn</i>
<b>);</b>
</pre>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/tanvon.wordpress.com/59/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/tanvon.wordpress.com/59/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/tanvon.wordpress.com/59/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/tanvon.wordpress.com/59/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/tanvon.wordpress.com/59/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/tanvon.wordpress.com/59/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/tanvon.wordpress.com/59/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/tanvon.wordpress.com/59/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/tanvon.wordpress.com/59/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/tanvon.wordpress.com/59/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/tanvon.wordpress.com/59/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/tanvon.wordpress.com/59/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=tanvon.wordpress.com&blog=410313&post=59&subd=tanvon&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://tanvon.wordpress.com/2008/09/07/enumerating-the-directshow-filter-pin/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/5aabd5e4a47152ef3de52cff0b219706?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">tanvon malik</media:title>
		</media:content>
	</item>
		<item>
		<title>Enumerating DirectShow Filters</title>
		<link>http://tanvon.wordpress.com/2008/08/30/enumerating-directshow-filters/</link>
		<comments>http://tanvon.wordpress.com/2008/08/30/enumerating-directshow-filters/#comments</comments>
		<pubDate>Sat, 30 Aug 2008 11:06:23 +0000</pubDate>
		<dc:creator>tanvon malik</dc:creator>
				<category><![CDATA[DirectShow]]></category>
		<category><![CDATA[DirectShow Filters]]></category>
		<category><![CDATA[Enum]]></category>
		<category><![CDATA[Filters]]></category>
		<category><![CDATA[Filters Enumeration]]></category>
		<category><![CDATA[System Device Enumerator]]></category>
		<category><![CDATA[Filter]]></category>

		<guid isPermaLink="false">http://tanvon.wordpress.com/2008/08/30/enumerating-directshow-filters/</guid>
		<description><![CDATA[System Device Enumerator
Wether you locating for a particular filter or want to enumerate all the filters on a system. The System Device Enumerator is a big help. Enumeration of DirectShow filters can be achieved with the help of System Device Enumerator. It is COM object. which expose ICreateDevEnum interface. It means first you have to [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=tanvon.wordpress.com&blog=410313&post=57&subd=tanvon&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><h4>System Device Enumerator</h4>
<p>Wether you locating for a particular filter or want to enumerate all the filters on a system. The <a href="http://msdn.microsoft.com/en-us/library/ms787752(VS.85).aspx">System Device Enumerator</a> is a big help. Enumeration of DirectShow filters can be achieved with the help of <a href="http://msdn.microsoft.com/en-us/library/ms787752(VS.85).aspx">System Device Enumerator</a>. It is COM object. which expose <b><a href="http://msdn.microsoft.com/en-us/library/ms784970(VS.85).aspx">ICreateDevEnum</a></b> interface. It means first you have to create the <a href="http://msdn.microsoft.com/en-us/library/ms787752(VS.85).aspx">System Device Enumerator</a> object, then you will grab its interface <b><a href="http://msdn.microsoft.com/en-us/library/ms784970(VS.85).aspx">ICreateDevEnum</a></b> , this interface exposes just one method <b><a href="http://msdn.microsoft.com/en-us/library/ms784969(VS.85).aspx">CreateClassEnumerator</a></b> this method actually creates&nbsp; enumerator, which can be used to enumerate the filters in a specific <a href="http://msdn.microsoft.com/en-us/library/ms783347(VS.85).aspx">Filter Category</a>, or can be used to enumerate all the <a href="http://msdn.microsoft.com/en-us/library/ms783347(VS.85).aspx">Filter Categories</a> on a users system.</p>
<h4><a href="http://msdn.microsoft.com/en-us/library/ms783347(VS.85).aspx">Filter Categories</a></h4>
<p>Filter in DirectShow are divided in the categories . Every category has its own class identifier called a CLSID. With the help of this CLSID it is easy to enumerate the filters of that specific class.</p>
<p>But first of all how to enumerate those categories, for this purpose there is a CLSID_ActiveMovieCategories CLSID. With it one can easily enumerate the categories which has filters in them.</p>
<pre class="code">HRESULT hr;
    ICreateDevEnum *pSysDevEnum = NULL;
    hr = CoCreateInstance(CLSID_SystemDeviceEnum,</pre>
<pre class="code">                           NULL, CLSCTX_INPROC_SERVER,
                           IID_ICreateDevEnum, (<span style="color:blue;">void </span>**)&amp;pSysDevEnum);
    <span style="color:blue;">if </span>(FAILED(hr))
    {
        <span style="color:blue;">return </span>hr;
    }
    IEnumMoniker *pEnumCat = NULL;
    hr = pSysDevEnum-&gt;CreateClassEnumerator(</pre>
<pre class="code">                       (GUID)CLSID_ActiveMovieCategories, &amp;pEnumCat, 0);
    <span style="color:blue;">if </span>(hr == S_OK)
    {
        <span style="color:green;">// Enumerate the monikers.
        </span>IMoniker *pMoniker = NULL;
        ULONG cFetched;
        <span style="color:blue;">while</span>(pEnumCat-&gt;Next(1, &amp;pMoniker, &amp;cFetched) == S_OK)
        {
            IPropertyBag *pPropBag;
            hr = pMoniker-&gt;BindToStorage(0, 0, IID_IPropertyBag,
                (<span style="color:blue;">void </span>**)&amp;pPropBag);
            <span style="color:blue;">if </span>(SUCCEEDED(hr))
            {
                VARIANT varName, varCLSID;
                VariantInit(&amp;varName);
                VariantInit(&amp;varCLSID);
                hr = pPropBag-&gt;Read(L<span style="color:#a31515;">"FriendlyName"</span>, &amp;varName, 0);
                <span style="color:blue;">if </span>(SUCCEEDED(hr))
                {
                    hr = pPropBag-&gt;Read(L<span style="color:#a31515;">"CLSID"</span>, &amp;varCLSID, 0);
                    <span style="color:blue;">if </span>(SUCCEEDED(hr))
                    {
                        GUID clsid;
                        <span style="color:blue;">if </span>(SUCCEEDED(CLSIDFromString(varCLSID.bstrVal,</pre>
<pre class="code">                                                               &amp;clsid)))
                        {
                            EnumFilters(clsid, hparent);</pre>
<p>&nbsp;</p>
<p>this snippet of code shows how to enumerate all the filter categories. Now you have all the filter categories it is time to enumerate the filters in those filter categories.</p>
<pre class="code"><span style="color:blue;">bool </span>CEnumFiltersDlg::EnumFilters(GUID clsid, HTREEITEM hparent)
{
        <span style="color:green;">// Create the System Device Enumerator.
    </span>HRESULT hr;
    ICreateDevEnum *pSysDevEnum = NULL;
    hr = CoCreateInstance(CLSID_SystemDeviceEnum,</pre>
<pre class="code">                           NULL, CLSCTX_INPROC_SERVER,
                           IID_ICreateDevEnum, (<span style="color:blue;">void </span>**)&amp;pSysDevEnum);
    <span style="color:blue;">if </span>(FAILED(hr))
    {
        <span style="color:blue;">return </span>hr;
    }
    IEnumMoniker *pEnumCat = NULL;
    hr = pSysDevEnum-&gt;CreateClassEnumerator((GUID)clsid, &amp;pEnumCat, 0);
    <span style="color:blue;">if </span>(hr == S_OK)
    {
        IMoniker *pMoniker = NULL;
        ULONG cFetched;
        <span style="color:blue;">while</span>(pEnumCat-&gt;Next(1, &amp;pMoniker, &amp;cFetched) == S_OK)
        {
            IPropertyBag *pPropBag;
            hr = pMoniker-&gt;BindToStorage(0, 0, IID_IPropertyBag,
                (<span style="color:blue;">void </span>**)&amp;pPropBag);
            <span style="color:blue;">if </span>(SUCCEEDED(hr))
            {
            <span style="color:green;">// To retrieve the filter's friendly name, do the following:
                </span>VARIANT varName;
                VariantInit(&amp;varName);
                hr = pPropBag-&gt;Read(L<span style="color:#a31515;">"FriendlyName"</span>, &amp;varName, 0);
                <span style="color:blue;">if </span>(SUCCEEDED(hr))
                {
                    <span style="color:green;">// Display the name in your UI somehow.
                    </span>TVINSERTSTRUCT tvInsert;
                    tvInsert.hParent = hparent;
                    tvInsert.hInsertAfter = NULL;
                    tvInsert.item.mask = TVIF_TEXT;
                    CString str(varName.bstrVal);
                    tvInsert.item.pszText = str.GetBuffer();
                    str.ReleaseBuffer();
                    mFiltersTree.InsertItem(&amp;tvInsert);
                }

                VariantClear(&amp;varName);
                pPropBag-&gt;Release();
            }
            pMoniker-&gt;Release();
        }
        pEnumCat-&gt;Release();
    }
    pSysDevEnum-&gt;Release();

    mFiltersTree.SortChildren(hparent);
    <span style="color:blue;">return true</span>;
}</pre>
<p>Here clsid parameter passed is the CLSID of the filter category whom&nbsp; to enumerate.</p>
<h5>NOTE<a href="http://tanvon.files.wordpress.com/2008/08/enum.jpg"><img style="border-width:0;" border="0" alt="enumerate DirectShow Filters" src="http://tanvon.files.wordpress.com/2008/08/enum-thumb.jpg?w=203&#038;h=244" width="203" height="244"></a></h5>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; this sample don&#8217;t enumerate the <a href="http://msdn.microsoft.com/en-us/library/ms783356(VS.85).aspx">DMO</a>s on a system as the Graph Edit utility enumerates in its insert filter function. I will try to add it later.</p>
<p><a href="http://tech.groups.yahoo.com/group/tanvon/files/DirectShow/">code can be found here</a></p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/tanvon.wordpress.com/57/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/tanvon.wordpress.com/57/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/tanvon.wordpress.com/57/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/tanvon.wordpress.com/57/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/tanvon.wordpress.com/57/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/tanvon.wordpress.com/57/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/tanvon.wordpress.com/57/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/tanvon.wordpress.com/57/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/tanvon.wordpress.com/57/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/tanvon.wordpress.com/57/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/tanvon.wordpress.com/57/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/tanvon.wordpress.com/57/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=tanvon.wordpress.com&blog=410313&post=57&subd=tanvon&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://tanvon.wordpress.com/2008/08/30/enumerating-directshow-filters/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/5aabd5e4a47152ef3de52cff0b219706?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">tanvon malik</media:title>
		</media:content>

		<media:content url="http://tanvon.files.wordpress.com/2008/08/enum-thumb.jpg" medium="image">
			<media:title type="html">enumerate DirectShow Filters</media:title>
		</media:content>
	</item>
		<item>
		<title>DirectShow which SDK to use ?</title>
		<link>http://tanvon.wordpress.com/2008/08/27/directshow-which-sdk-to-use/</link>
		<comments>http://tanvon.wordpress.com/2008/08/27/directshow-which-sdk-to-use/#comments</comments>
		<pubDate>Wed, 27 Aug 2008 05:15:40 +0000</pubDate>
		<dc:creator>tanvon malik</dc:creator>
				<category><![CDATA[DirectShow]]></category>
		<category><![CDATA[DirectShow Filters]]></category>
		<category><![CDATA[Filters]]></category>
		<category><![CDATA[Windows SDK]]></category>

		<guid isPermaLink="false">http://tanvon.wordpress.com/2008/08/27/directshow-which-sdk-to-use/</guid>
		<description><![CDATA[The DirectShow was part of the DirectX SDK , then it was removed from the DirectX SDK and was made part of the Platform SDK, But now that Platform SDK has been replaced by Windows SDK. The latest Windows SDK is the Microsoft Windows SDK for Windows Server 2008 and .NET Framework 3.5, released February, [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=tanvon.wordpress.com&blog=410313&post=53&subd=tanvon&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>The DirectShow was part of the DirectX SDK , then it was removed from the DirectX SDK and was made part of the <a href="http://www.microsoft.com/downloads/details.aspx?FamilyId=0BAF2B35-C656-4969-ACE8-E4C0C0716ADB&amp;displaylang=en">Platform SDK</a>, But now that <a href="http://www.microsoft.com/downloads/details.aspx?FamilyId=0BAF2B35-C656-4969-ACE8-E4C0C0716ADB&amp;displaylang=en">Platform SDK</a> has been replaced by <a href="http://www.microsoft.com/downloads/details.aspx?FamilyId=E6E1C3DF-A74F-4207-8586-711EBE331CDC&amp;displaylang=en">Windows SDK</a>. The latest Windows SDK is the <b><a href="http://www.microsoft.com/downloads/details.aspx?FamilyId=E6E1C3DF-A74F-4207-8586-711EBE331CDC&amp;displaylang=en">Microsoft Windows SDK for Windows Server 2008 and .NET Framework 3.5</a></b>, released February, 2008.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/tanvon.wordpress.com/53/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/tanvon.wordpress.com/53/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/tanvon.wordpress.com/53/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/tanvon.wordpress.com/53/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/tanvon.wordpress.com/53/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/tanvon.wordpress.com/53/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/tanvon.wordpress.com/53/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/tanvon.wordpress.com/53/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/tanvon.wordpress.com/53/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/tanvon.wordpress.com/53/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/tanvon.wordpress.com/53/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/tanvon.wordpress.com/53/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=tanvon.wordpress.com&blog=410313&post=53&subd=tanvon&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://tanvon.wordpress.com/2008/08/27/directshow-which-sdk-to-use/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/5aabd5e4a47152ef3de52cff0b219706?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">tanvon malik</media:title>
		</media:content>
	</item>
		<item>
		<title>System Device Enumerator</title>
		<link>http://tanvon.wordpress.com/2008/08/16/system-device-enumerator/</link>
		<comments>http://tanvon.wordpress.com/2008/08/16/system-device-enumerator/#comments</comments>
		<pubDate>Sat, 16 Aug 2008 18:21:42 +0000</pubDate>
		<dc:creator>tanvon malik</dc:creator>
				<category><![CDATA[DirectShow]]></category>
		<category><![CDATA[DirectShow Filters]]></category>
		<category><![CDATA[Filters]]></category>

		<guid isPermaLink="false">http://tanvon.wordpress.com/?p=49</guid>
		<description><![CDATA[Another interesting question on tanvon Yahoo Group is,
&#8221; Could any one tell me how to go about listing all the DirectShow
Filter Categories so that i can list the filters under each category.&#8221;
There are two ways to enumerate the filters the Filter Mapper way and the System Device Enumerator way.
Here I will explain the System Device [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=tanvon.wordpress.com&blog=410313&post=49&subd=tanvon&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Another interesting question on <a href="http://tech.groups.yahoo.com/group/tanvon/message/131">tanvon Yahoo Group </a>is,<br />
&#8221; Could any one tell me how to go about listing all the DirectShow<br />
Filter Categories so that i can list the filters under each category.&#8221;<br />
There are two ways to enumerate the filters the <a href="http://msdn.microsoft.com/en-us/library/ms783672(VS.85).aspx">Filter Mapper </a>way and the <a href="http://msdn.microsoft.com/en-us/library/ms787752(VS.85).aspx">System Device Enumerator </a>way.<br />
Here I will explain the <a href="http://msdn.microsoft.com/en-us/library/ms787752(VS.85).aspx">System Device Enumerator</a>.<br />
The <a href="http://msdn.microsoft.com/en-us/library/ms787752(VS.85).aspx">System Device Enumerator </a>is a COM object, which implements the <a href="http://msdn.microsoft.com/en-us/library/ms784970(VS.85).aspx">ICreateDevEnum </a>interface,<br />
this intreface exposes only a single method <a href="http://msdn.microsoft.com/en-us/library/ms784969(VS.85).aspx">CreateClassEnumerator</a>. This is the method which creates the enumerator object and returns its IEnumMoniker interface, but enumerate what<br />
HRESULT CreateClassEnumerator(<br />
  REFCLSID clsidDeviceClass,<br />
  IEnumMoniker **ppEnumMoniker,<br />
  DWORD dwFlags<br />
);<br />
The first parameter is the class identifier (CLSID) of the <a href="http://msdn.microsoft.com/en-us/library/ms783347(VS.85).aspx">device category</a>. these categories are defined in the Dshow.h header file. (e.g. CLSID_LegacyAmFilterCategory , CLSID_AudioRendererCategory ). This is the place to notice that you have to specify which category you want to enumerate.<br />
Once you have the IEnumMoniker, now you can use its methods to easily enumerate the device category. Just call IEnumMoniker::Next  method, this will return an IMoniker interface with this interface you can get the &#8220;Friendly Name&#8221; of the filter or you can instanciate the filter itself.<br />
For an example see <a href="http://msdn.microsoft.com/en-us/library/ms787871(VS.85).aspx">http://msdn.microsoft.com/en-us/library/ms787871(VS.85).aspx</a></p>
<p>For the URDU version see <a href="http://directshow.wordpress.com/2008/08/16/system-device-enumerator/">http://directshow.wordpress.com/2008/08/16/system-device-enumerator/</a></p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/tanvon.wordpress.com/49/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/tanvon.wordpress.com/49/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/tanvon.wordpress.com/49/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/tanvon.wordpress.com/49/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/tanvon.wordpress.com/49/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/tanvon.wordpress.com/49/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/tanvon.wordpress.com/49/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/tanvon.wordpress.com/49/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/tanvon.wordpress.com/49/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/tanvon.wordpress.com/49/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/tanvon.wordpress.com/49/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/tanvon.wordpress.com/49/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=tanvon.wordpress.com&blog=410313&post=49&subd=tanvon&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://tanvon.wordpress.com/2008/08/16/system-device-enumerator/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/5aabd5e4a47152ef3de52cff0b219706?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">tanvon malik</media:title>
		</media:content>
	</item>
		<item>
		<title>Intelligent Connect</title>
		<link>http://tanvon.wordpress.com/2008/08/15/intelligent-connect/</link>
		<comments>http://tanvon.wordpress.com/2008/08/15/intelligent-connect/#comments</comments>
		<pubDate>Fri, 15 Aug 2008 16:57:24 +0000</pubDate>
		<dc:creator>tanvon malik</dc:creator>
				<category><![CDATA[DirectShow]]></category>
		<category><![CDATA[DirectShow Filters]]></category>
		<category><![CDATA[Filter Graph]]></category>
		<category><![CDATA[Intelligent Connect]]></category>

		<guid isPermaLink="false">http://tanvon.wordpress.com/?p=47</guid>
		<description><![CDATA[As a member of yahoo group asked about the so called non-intelligent connect .
Adding and connecting distinct filter in the filter graph manually.
Actually there are many small functions which need to be taken care, So this
may take a little longer to understand, So keep reading this series of blog entries about
connecting filter without intelligent connect [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=tanvon.wordpress.com&blog=410313&post=47&subd=tanvon&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>As a <a href="http://tech.groups.yahoo.com/group/tanvon/message/137">member of yahoo group asked </a>about the so called non-intelligent connect .<br />
Adding and connecting distinct filter in the filter graph manually.<br />
Actually there are many small functions which need to be taken care, So this<br />
may take a little longer to understand, So keep reading this series of blog entries about<br />
connecting filter without intelligent connect in DirectShow.</p>
<p><strong>Intelligent Connect</strong><br />
 There are some intelligent algorithms behind this, Which<br />
share the burden of the programmer. Suppose for a little time what<br />
hassle is hidden behind it. Once the  IGraphBuilder::RenderFile()<br />
is called the Filter Graph Manager searches for the suitable source filter<br />
which can read and understand the format of media file. Then it tries to<br />
search for a filter which can decode or parse that data (this data is called Media Samples in the DirectShow)<br />
which the source filter will handle to it (through transport), The media sample format which is said the Media Type in the DirectShow<br />
must be same that both filters will understand otherwise the connection will fail,<br />
and Filter Graph Manager will drop that filter and will search for another filter which<br />
will handle the samples with the specified Media Type.<br />
Then Filter Graph Manager will try to load other filters to complete the Filter Graph.<br />
At the end it will load the default Renderer to Display the contents on the screen.<br />
and will connect that with the entire filter graph build previously.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/tanvon.wordpress.com/47/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/tanvon.wordpress.com/47/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/tanvon.wordpress.com/47/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/tanvon.wordpress.com/47/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/tanvon.wordpress.com/47/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/tanvon.wordpress.com/47/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/tanvon.wordpress.com/47/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/tanvon.wordpress.com/47/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/tanvon.wordpress.com/47/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/tanvon.wordpress.com/47/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/tanvon.wordpress.com/47/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/tanvon.wordpress.com/47/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=tanvon.wordpress.com&blog=410313&post=47&subd=tanvon&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://tanvon.wordpress.com/2008/08/15/intelligent-connect/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/5aabd5e4a47152ef3de52cff0b219706?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">tanvon malik</media:title>
		</media:content>
	</item>
		<item>
		<title>DirectShow in Urdu</title>
		<link>http://tanvon.wordpress.com/2008/08/15/directshow-in-urdu/</link>
		<comments>http://tanvon.wordpress.com/2008/08/15/directshow-in-urdu/#comments</comments>
		<pubDate>Fri, 15 Aug 2008 06:19:36 +0000</pubDate>
		<dc:creator>tanvon malik</dc:creator>
				<category><![CDATA[DirectShow]]></category>
		<category><![CDATA[Urdu]]></category>

		<guid isPermaLink="false">http://tanvon.wordpress.com/?p=45</guid>
		<description><![CDATA[I am going to keep a new blog DirectShow.WordPress.com . This blog will be and is in Urdu language about definitely DirectShow. I will try to keep my both blogs in synch with each other.
       <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=tanvon.wordpress.com&blog=410313&post=45&subd=tanvon&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>I am going to keep a new blog <a href="http://directshow.wordpress.com/">DirectShow.WordPress.com </a>. This blog will be and is in Urdu language about definitely DirectShow. I will try to keep my both blogs in synch with each other.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/tanvon.wordpress.com/45/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/tanvon.wordpress.com/45/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/tanvon.wordpress.com/45/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/tanvon.wordpress.com/45/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/tanvon.wordpress.com/45/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/tanvon.wordpress.com/45/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/tanvon.wordpress.com/45/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/tanvon.wordpress.com/45/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/tanvon.wordpress.com/45/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/tanvon.wordpress.com/45/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/tanvon.wordpress.com/45/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/tanvon.wordpress.com/45/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=tanvon.wordpress.com&blog=410313&post=45&subd=tanvon&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://tanvon.wordpress.com/2008/08/15/directshow-in-urdu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/5aabd5e4a47152ef3de52cff0b219706?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">tanvon malik</media:title>
		</media:content>
	</item>
		<item>
		<title>Opening Command Pormpt in the current directory (folder)</title>
		<link>http://tanvon.wordpress.com/2007/09/26/opening-command-pormpt-in-the-current-directory-folder/</link>
		<comments>http://tanvon.wordpress.com/2007/09/26/opening-command-pormpt-in-the-current-directory-folder/#comments</comments>
		<pubDate>Wed, 26 Sep 2007 21:37:38 +0000</pubDate>
		<dc:creator>tanvon malik</dc:creator>
				<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://tanvon.wordpress.com/2007/09/26/opening-command-pormpt-in-the-current-directory-folder/</guid>
		<description><![CDATA[This was a big problem for me, as sometimes I have to go in a
folder and afterwords have to open the command prompt in that
same folder.
Now the problem is solved,
1 just make a text file in the current folder
2 and open txt file
3 type in that text file cmd
4 save that file
5 rename it to [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=tanvon.wordpress.com&blog=410313&post=42&subd=tanvon&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>This was a big problem for me, as sometimes I have to go in a<br />
folder and afterwords have to open the command prompt in that<br />
same folder.</p>
<p>Now the problem is solved,<br />
1 just make a text file in the current folder<br />
2 and open txt file<br />
3 type in that text file cmd<br />
4 save that file<br />
5 rename it to amazing.bat</p>
<p>every thing is ok , now just click that file<br />
it will open that command prompt in that current folder.</p>
<p>caution never try to name that file to cmd.bat or you<br />
will see an amazing screen<br />
Why if you ask then I will tell, first give some task to<br />
your brain.</p>
<p>&lt;!&#8211; &#8211;&gt;</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/tanvon.wordpress.com/42/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/tanvon.wordpress.com/42/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/tanvon.wordpress.com/42/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/tanvon.wordpress.com/42/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/tanvon.wordpress.com/42/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/tanvon.wordpress.com/42/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/tanvon.wordpress.com/42/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/tanvon.wordpress.com/42/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/tanvon.wordpress.com/42/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/tanvon.wordpress.com/42/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/tanvon.wordpress.com/42/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/tanvon.wordpress.com/42/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=tanvon.wordpress.com&blog=410313&post=42&subd=tanvon&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://tanvon.wordpress.com/2007/09/26/opening-command-pormpt-in-the-current-directory-folder/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/5aabd5e4a47152ef3de52cff0b219706?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">tanvon malik</media:title>
		</media:content>
	</item>
	</channel>
</rss>