<?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/"
	>

<channel>
	<title>Fooling Around &#187; Utilities</title>
	<atom:link href="http://alax.info/blog/category/utilities/feed" rel="self" type="application/rss+xml" />
	<link>http://alax.info/blog</link>
	<description>Software Production Line</description>
	<lastBuildDate>Tue, 03 Aug 2010 09:48:06 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>MediaTools: Two samples to capture M-JPEG video into JPEG files and to play JPEG files back</title>
		<link>http://alax.info/blog/1127</link>
		<comments>http://alax.info/blog/1127#comments</comments>
		<pubDate>Thu, 13 May 2010 06:15:48 +0000</pubDate>
		<dc:creator>Roman</dc:creator>
				<category><![CDATA[ATL]]></category>
		<category><![CDATA[Media Tools]]></category>
		<category><![CDATA[Source]]></category>
		<category><![CDATA[C++]]></category>
		<category><![CDATA[DirectShow]]></category>
		<category><![CDATA[ip camera]]></category>
		<category><![CDATA[JPEG]]></category>
		<category><![CDATA[M-JPEG]]></category>
		<category><![CDATA[sample]]></category>
		<category><![CDATA[Video]]></category>

		<guid isPermaLink="false">http://alax.info/blog/?p=1127</guid>
		<description><![CDATA[I added two new simple samples for the MediaTools DirectShow filters to demonstrate how to capture M-JPEG video feed, esp. from an IP camera, and write the video frames into sequence of JPEG files. The other sample takes a directory on the input and plays the images back as video. If you are working on [...]]]></description>
			<content:encoded><![CDATA[<p>I added two new simple samples for the MediaTools DirectShow filters to demonstrate how to capture M-JPEG video feed, esp. from an IP camera, and write the video frames into sequence of JPEG files. The other sample takes a directory on the input and plays the images back as video. If you are working on certain transformation filter, it is an easy way to make a reference feed and use it for debugging purposes.</p>
<p>The filters behind that empower the sample are described in <a href="http://alax.info/blog/741">another post</a>.</p>
<p><strong>RenderHttpMjpegVideoIntoFiles01</strong> sample takes an URL on the input to generate <a href="http://www.w3schools.com/media/media_mimeref.asp">image/jpeg JPEG</a> or <a href="http://en.wikipedia.org/wiki/Motion_JPEG">multipart/x-mixed-replace M-JPEG</a> stream. For example, it might be <a href="http://demo1.stardotcams.com/nph-mjpeg.cgi">http://demo1.stardotcams.com/nph-mjpeg.cgi</a> feed from a demo <a href="http://www.stardot.com/">StarDot Technologies</a> IP camera.</p>
<p>The application will create a new directory to write files into, and will save each new video frame received into new JPEG file.</p>
<pre>Z:\MediaTools\Samples\RenderHttpMjpegVideoIntoFiles01\Release&gt;RenderHttpMjpegVideoIntoFiles01.exe http://demo1.stardotcams.com/nph-mjpeg.cgi
URL: http://demo1.stardotcams.com/nph-mjpeg.cgi
Writing to directory: Z:\MediaTools\Samples\RenderHttpMjpegVideoIntoFiles01\Release\2010-05-12 22-07-37
Event: nCode EC_CLOCK_CHANGED 0xD, nParameter1 0x00000000, nParameter2 0x00000000
Event: nCode EC_PAUSED 0xE, nResult 0x00000000, nParameter2 0x00000000
[...]
^C</pre>
<p>The application will generate the files and convert media sample time stamps into file time.</p>
<p><a href="http://alax.info/blog/wp-content/uploads/2010/05/13-Image001.png"><img class="alignnone size-medium wp-image-1128" title="RenderHttpMjpegVideoIntoFiles01 Sample Output" src="http://alax.info/blog/wp-content/uploads/2010/05/13-Image001-320x175.png" alt="RenderHttpMjpegVideoIntoFiles01 Sample Output" width="320" height="175" /></a></p>
<p>The DirectShow graph that implements the operation is the following:</p>
<p><img class="alignnone size-full wp-image-1129" title="RenderHttpMjpegVideoIntoFiles01 Filter Graph" src="http://alax.info/blog/wp-content/uploads/2010/05/13-Image002.png" alt="RenderHttpMjpegVideoIntoFiles01 Filter Graph" width="661" height="346" /></p>
<p>The other sample <strong>RenderJpegFiles01</strong> takes a directory path to look for JPEG files, e.g. generated by previous sample, and pushes them into DirectShow graph as a video feed. File times will be converted [back] to media sample times.</p>
<p><span id="more-1127"></span></p>
<pre>Z:\MediaTools\Samples\RenderJpegFiles01\Release&gt;RenderJpegFiles01 "Z:\MediaTools\Samples\RenderHttpMjpegVideoIntoFiles01\Release\2010-05-12 22-07-37"
Directory: Z:\MediaTools\Samples\RenderHttpMjpegVideoIntoFiles01\Release\2010-05-12 22-07-37
Event: nCode EC_CLOCK_CHANGED 0xD, nParameter1 0x00000000, nParameter2 0x00000000
Event: nCode EC_PAUSED 0xE, nResult 0x00000000, nParameter2 0x00000000
Event: nCode EC_VMR_RECONNECTION_FAILED 0x55, nResult 0x80004005, nParameter2 0x00000000
Event: nCode EC_VMR_RENDERDEVICE_SET 0x53, RendererDeviceType 0x2, nParameter2 0x00000000
Event: nCode EC_VIDEO_SIZE_CHANGED 0xA, Extent 384x240, nParameter2 0x00000000
Event: nCode EC_COMPLETE 0x1, nResult 0x00000000, nParameter2 0x00000000
Event: nCode EC_ERRORABORT 0x3, nResult 0x80004005, nParameter2 0x00000000
Detected resolution change, new resolution is 1024x768, recreating filter graph...
Event: nCode EC_VMR_RECONNECTION_FAILED 0x55, nResult 0x80004005, nParameter2 0x00000000
Event: nCode EC_VMR_RENDERDEVICE_SET 0x53, RendererDeviceType 0x2, nParameter2 0x00000000
Event: nCode EC_VIDEO_SIZE_CHANGED 0xA, Extent 384x240, nParameter2 0x00000000
Event: nCode EC_CLOCK_CHANGED 0xD, nParameter1 0x00000000, nParameter2 0x00000000
Event: nCode EC_PAUSED 0xE, nResult 0x00000000, nParameter2 0x00000000</pre>
<p><a href="http://alax.info/blog/wp-content/uploads/2010/05/13-Image003.png"><img class="alignnone size-medium wp-image-1130" title="RenderJpegFiles01 DirectShow Graph and Output" src="http://alax.info/blog/wp-content/uploads/2010/05/13-Image003-312x320.png" alt="RenderJpegFiles01 DirectShow Graph and Output" width="312" height="320" /></a></p>
<p>Download links:</p>
<ul>
<li>RenderHttpMjpegVideoIntoFiles01: <a href="http://www.assembla.com/code/roatl-utilities/subversion/nodes/trunk/MediaTools/Samples/RenderHttpMjpegVideoIntoFiles01">source code</a>, <a href="http://www.assembla.com/code/roatl-utilities/subversion/nodes/trunk/MediaTools/Samples/RenderHttpMjpegVideoIntoFiles01/Release/RenderHttpMjpegVideoIntoFiles01.exe?format=raw">binary</a></li>
<li>RenderJpegFiles01: <a href="http://www.assembla.com/code/roatl-utilities/subversion/nodes/trunk/MediaTools/Samples/RenderJpegFiles01">source code</a>, <a href="http://www.assembla.com/code/roatl-utilities/subversion/nodes/trunk/MediaTools/Samples/RenderJpegFiles01/Release/RenderJpegFiles01.exe?format=raw">binary</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://alax.info/blog/1127/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>ProcessSnapshot: Create process minidump for port-mortem debugging</title>
		<link>http://alax.info/blog/1119</link>
		<comments>http://alax.info/blog/1119#comments</comments>
		<pubDate>Wed, 24 Mar 2010 22:17:42 +0000</pubDate>
		<dc:creator>Roman</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[Utilities]]></category>
		<category><![CDATA[.DMP]]></category>
		<category><![CDATA[ATL]]></category>
		<category><![CDATA[debug]]></category>
		<category><![CDATA[minidump]]></category>
		<category><![CDATA[performance]]></category>
		<category><![CDATA[process]]></category>
		<category><![CDATA[snapshot]]></category>
		<category><![CDATA[Source]]></category>
		<category><![CDATA[utility]]></category>
		<category><![CDATA[WTL]]></category>

		<guid isPermaLink="false">http://alax.info/blog/?p=1119</guid>
		<description><![CDATA[ProcessSnapshot is a utility to take a snapshot of process call stacks, and the snapshot taken is written into a human friendly text file.

Additionally to this, the utility has been given a capability to create process minidump files, on user request. The minidump files can be used with debugger to analyze the context of the [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://alax.info/blog/665">ProcessSnapshot</a> is a utility to take a snapshot of process call stacks, and the snapshot taken is written into a human friendly text file.</p>
<p><a href="http://alax.info/blog/wp-content/uploads/2010/03/24-Image001.png"><img class="alignnone size-medium wp-image-1120" title="ProcessSnapshot is taking process minidump files" src="http://alax.info/blog/wp-content/uploads/2010/03/24-Image001-320x189.png" alt="ProcessSnapshot is taking process minidump files" width="320" height="189" /></a></p>
<p>Additionally to this, the utility has been given a capability to create process <a href="http://msdn.microsoft.com/en-us/library/ms680369%28VS.85%29.aspx">minidump files</a>, on user request. The minidump files can be used with debugger to analyze the context of the process using feature rich debug environment, esp. Microsoft Visual Studio. To create a minidump for a process, check a corresponding box and press &#8220;Take a Dump&#8221; button. A file named &#8220;&lt;process-image-name&gt; &#8211; &lt;date&gt; &lt;time&gt;.dmp&#8221; will be created in the directory of the utility executable.</p>
<p>See also:</p>
<ul>
<li><a href="http://msdn.microsoft.com/en-us/library/ms680369%28VS.85%29.aspx">Minidump Files (MSDN)</a></li>
<li><a href="http://support.microsoft.com/kb/315263">How to read the small memory dump files that Windows creates for debugging</a></li>
<li><a href="http://www.codeproject.com/KB/debug/postmortemdebug_standalone1.aspx">Post-Mortem Debugging Your Application with Minidumps and Visual Studio .NET</a></li>
<li><a href="http://www.pchell.com/support/minidumps.shtml">How to View Windows Minidump Files</a></li>
</ul>
<p>A binary [<a href="http://www.assembla.com/code/roatl-utilities/subversion/nodes/trunk/ProcessSnapshot/Win32/Release/ProcessSnapshot.exe?format=raw">Win32</a>, <a href="http://www.assembla.com/code/roatl-utilities/subversion/nodes/trunk/ProcessSnapshot/x64/Release/ProcessSnapshot.exe?format=raw">x64</a>] and partial Visual C++ .NET 2008 source code <a href="http://trac2.assembla.com/roatl-utilities/browser/trunk/ProcessSnapshot/Release/ProcessSnapshot.exe">are  available from SVN</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://alax.info/blog/1119/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>MediaTools: Fix for Motion JPEG video</title>
		<link>http://alax.info/blog/1073</link>
		<comments>http://alax.info/blog/1073#comments</comments>
		<pubDate>Tue, 06 Oct 2009 19:16:29 +0000</pubDate>
		<dc:creator>Roman</dc:creator>
				<category><![CDATA[Media Tools]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[authentication]]></category>
		<category><![CDATA[bug]]></category>
		<category><![CDATA[fix]]></category>
		<category><![CDATA[HTTP]]></category>
		<category><![CDATA[JPEG]]></category>
		<category><![CDATA[M-JPEG]]></category>
		<category><![CDATA[update]]></category>
		<category><![CDATA[Video]]></category>

		<guid isPermaLink="false">http://alax.info/blog/?p=1073</guid>
		<description><![CDATA[A small fix for M-JPEG video streams retrieved by HTTP Stream Source Filter:

Username and password contained in URL are honored for Basic HTTP authentication
Correctly parsed HTTP response headers with quotes, e.g.:
Content-Type: multipart/x-mixed-replace; boundary=&#8220;myboundary&#8220;

Partial Visual C++ .NET 2008 source code is available from SVN, release binary included.
]]></description>
			<content:encoded><![CDATA[<p>A small fix for <a href="http://en.wikipedia.org/wiki/Motion_JPEG">M-JPEG</a> video streams retrieved by <a href="http://alax.info/blog/741">HTTP Stream Source Filter</a>:</p>
<ul>
<li>Username and password contained in URL are honored for <a href="http://en.wikipedia.org/wiki/Basic_access_authentication">Basic HTTP authentication</a></li>
<li>Correctly parsed HTTP response headers with quotes, e.g.:<br />
<em>Content-Type: multipart/x-mixed-replace; boundary=<strong><span style="color: #ff0000;">&#8220;</span></strong>myboundary<strong><span style="color: #ff0000;">&#8220;</span></strong></em></li>
</ul>
<p>Partial Visual C++ .NET 2008 source code is <a href="http://code.assembla.com/roatl-utilities/subversion/nodes/trunk/MediaTools/">available from SVN</a>, release binary <a href="http://code.assembla.com/roatl-utilities/subversion/nodes/trunk/MediaTools/_Bin/Release Trace">included</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://alax.info/blog/1073/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Audio Oscillogram DirectShow Filter</title>
		<link>http://alax.info/blog/1033</link>
		<comments>http://alax.info/blog/1033#comments</comments>
		<pubDate>Fri, 18 Sep 2009 17:01:32 +0000</pubDate>
		<dc:creator>Roman</dc:creator>
				<category><![CDATA[Media Tools]]></category>
		<category><![CDATA[Audio]]></category>
		<category><![CDATA[DirectShow]]></category>
		<category><![CDATA[filter]]></category>
		<category><![CDATA[mediatools]]></category>
		<category><![CDATA[visual]]></category>

		<guid isPermaLink="false">http://alax.info/blog/?p=1033</guid>
		<description><![CDATA[Unlike video, audio is difficult to troubleshoot in a way that once an issue has been noticed it was dynamic and already in past and it may be difficult to repeat, explain, forward as a screenshot etc. So it needs a visualization in order to check certain specific of the media stream.
Here we go with [...]]]></description>
			<content:encoded><![CDATA[<p>Unlike video, audio is difficult to troubleshoot in a way that once an issue has been noticed it was dynamic and already in past and it may be difficult to repeat, explain, forward as a screenshot etc. So it needs a visualization in order to check certain specific of the media stream.</p>
<p>Here we go with a Audio Oscillogram Filter, a filter which may be inserted into audio part of the graph, it insists on PCM audio (multichannel is OK, 8 or 16 bits per sample), so decoders might be required upstream and will be automatically inserted.</p>
<p>Once the filter is running, it shows a tool window with a visualization of the waveform coming through. Additionally, it shows a discontinuity sample (that is, a sample with <a href="http://msdn.microsoft.com/en-us/library/dd373500%28VS.85%29.aspx">AM_SAMPLE_DATADISCONTINUITY</a> flag)  with a thick read vertical line, and a mismatch (gap or override) in neighboring sample start and stop times with a thin red line.</p>
<p><a href="http://alax.info/blog/wp-content/uploads/2009/09/18-image001.png"><img class="alignnone size-medium wp-image-1034" title="Alax.Info Audio Oscillogram Filter" src="http://alax.info/blog/wp-content/uploads/2009/09/18-image001-320x193.png" alt="Alax.Info Audio Oscillogram Filter" width="320" height="193" /></a></p>
<p>Additionally to this, a window provides an option to pop up downstream audio renderer property sheet in order to check/debug rendering statistics, such as buffer fullness and break count (programmatically available via <a href="http://msdn.microsoft.com/en-us/library/dd389140%28VS.85%29.aspx">IAMAudioRendererStats</a> interface). Unfortunately Microsoft does not provide a well done proxy/stub pair for this interface and the property page and there is no way to access this property page connecting to graph remotely. Using this filter the property sheet is shown directly from the hosting process and works correctly.</p>
<p><a href="http://alax.info/blog/wp-content/uploads/2009/09/20-image001.png"><img class="alignnone size-medium wp-image-1042" title="Audio Renderer Properties" src="http://alax.info/blog/wp-content/uploads/2009/09/20-image001-320x231.png" alt="Audio Renderer Properties" width="320" height="231" /></a></p>
<p>A partial Visual C++ .NET 2008 source code is <a href="http://code.assembla.com/roatl-utilities/subversion/nodes/trunk/MediaTools/Utility">available from SVN</a>, release binary <a href="http://code.assembla.com/roatl-utilities/subversion/nodes/trunk/MediaTools/_Bin/Release%20Trace/Utility.dll?format=raw">included</a>.</p>
<h2>File and Class Summary</h2>
<h3>Utility.dll</h3>
<p>Utility.dll (<a href="http://code.assembla.com/roatl-utilities/subversion/nodes/trunk/MediaTools/_Bin/Release%20Trace/Utility.dll?format=raw">download</a>) hosts the following classes:</p>
<ul>
<li>DirectShow Filters
<ul>
<li><span style="text-decoration: underline;">Audio Oscillogram Filter</span>, to visualize/debug audio data</li>
</ul>
</li>
</ul>
<h2>Class Overview</h2>
<h3>Audio Oscillogram Filter</h3>
<p>The filter visualizes PCM audio data going through in a form of oscillogram.</p>
<ul>
<li>Filter Executable: Utility.dll</li>
<li>Filter CLSID: __uuidof(PcmAudioOscillogramFilter) {1450C047-C394-469e-BBB6-A1F949B893FA}</li>
<li>Filter Property Page CLSID: N/A</li>
<li>Filter Merit: <a href="http://msdn.microsoft.com/en-us/library/ms787275%28VS.85%29.aspx">MERIT_DO_NOT_USE</a></li>
<li>Filter Category: <a href="http://msdn.microsoft.com/en-us/library/ms783347%28VS.85%29.aspx">CLSID_LegacyAmFilterCategory</a></li>
<li>Filter Interfaces: <a href="http://msdn.microsoft.com/en-us/library/ms682273%28VS.85%29.aspx">IPersistStreamInit</a>, <a href="http://msdn.microsoft.com/en-us/library/ms690091%28VS.85%29.aspx">IPersistStream</a>, <a href="http://msdn.microsoft.com/en-us/library/ms784601%28VS.85%29.aspx">IBaseFilter</a>, <a href="http://msdn.microsoft.com/en-us/library/ms785914%28VS.85%29.aspx">IMediaFilter</a>, <a href="http://msdn.microsoft.com/en-us/library/ms688695%28VS.85%29.aspx">IPersist</a>, <a href="http://msdn.microsoft.com/en-us/library/ms784083%28VS.85%29.aspx">IAMovieSetup</a>, <a href="http://msdn.microsoft.com/en-us/library/ms783950%28VS.85%29.aspx">IAMFilterMiscFlags</a>, IPcmAudioOscillogramFilter, <a href="http://msdn.microsoft.com/en-us/library/ms221608.aspx">IDispatch</a></li>
<li>Filter Pins: single input pin (Input), single ouput pin (Ouput)</li>
<li>Input Pin Media Types: MEDIATYPE_Audio/MEDIASUBTYPE_PCM</li>
<li>Input Pin Interfaces: <a href="http://msdn.microsoft.com/en-us/library/ms786565%28VS.85%29.aspx">IPin</a>, <a href="http://msdn.microsoft.com/en-us/library/ms786054%28VS.85%29.aspx">IMemInputPin</a></li>
<li>Output Pin Media Types: MEDIATYPE_Audio/MEDIASUBTYPE_PCM</li>
<li>Output Pin Interfaces: <a href="http://msdn.microsoft.com/en-us/library/ms786565%28VS.85%29.aspx">IPin</a></li>
</ul>
<h4>Remarks</h4>
<p>The filter will create a tool window with audio visualization when put into paused/running state. The filter graph should be controlled (IMediaControl) from a GUI aware apartment so that window messages could reach internal filter&#8217;s window.</p>
]]></content:encoded>
			<wfw:commentRss>http://alax.info/blog/1033/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Windows Media Codec List</title>
		<link>http://alax.info/blog/1025</link>
		<comments>http://alax.info/blog/1025#comments</comments>
		<pubDate>Fri, 28 Aug 2009 16:58:47 +0000</pubDate>
		<dc:creator>Roman</dc:creator>
				<category><![CDATA[Audio]]></category>
		<category><![CDATA[Utilities]]></category>
		<category><![CDATA[Video]]></category>
		<category><![CDATA[WTL]]></category>
		<category><![CDATA[codec]]></category>
		<category><![CDATA[utility]]></category>
		<category><![CDATA[windows media]]></category>

		<guid isPermaLink="false">http://alax.info/blog/?p=1025</guid>
		<description><![CDATA[Windows Media Codec List utility uses IWMCodecInfo interface (see also IWMCodecInfo2, IWMCodecInfo3) lists installed Windows Media Codecs and their formats and presents the findings in a convenient way. The utility gives a quick idea what a programmer would obtain through IWMCodecInfo2/IWMCodecInfo3 interfaces and what well known format structures (WM_MEDIA_TYPE, AM_MEDIA_TYPE, WAVEFORMATEX, VIDEOINFOHEADER) correspond to particular [...]]]></description>
			<content:encoded><![CDATA[<p>Windows Media Codec List utility uses <a href="http://msdn.microsoft.com/en-us/library/dd743313%28VS.85%29.aspx">IWMCodecInfo</a> interface (see also <a href="http://msdn.microsoft.com/en-us/library/dd743314(VS.85).aspx">IWMCodecInfo2</a>, <a href="http://msdn.microsoft.com/en-us/library/dd743317(VS.85).aspx">IWMCodecInfo3</a>) lists installed <a href="http://www.microsoft.com/windows/windowsmedia/default.mspx">Windows Media</a> Codecs and their formats and presents the findings in a convenient way. The utility gives a quick idea what a programmer would obtain through <a href="http://msdn.microsoft.com/en-us/library/dd743314(VS.85).aspx">IWMCodecInfo2</a>/<a href="http://msdn.microsoft.com/en-us/library/dd743317(VS.85).aspx">IWMCodecInfo3</a> interfaces and what well known format structures (<a href="http://msdn.microsoft.com/en-us/library/dd757963%28VS.85%29.aspx">WM_MEDIA_TYPE</a>, <a href="http://msdn.microsoft.com/en-us/library/dd373477%28VS.85%29.aspx">AM_MEDIA_TYPE</a>, <a href="http://msdn.microsoft.com/en-us/library/dd757720%28VS.85%29.aspx">WAVEFORMATEX</a>, <a href="http://msdn.microsoft.com/en-us/library/dd407325%28VS.85%29.aspx">VIDEOINFOHEADER</a>) correspond to particular format.</p>
<p>For a description of Windows Media video and audio codecs, check article <a href="http://www.microsoft.com/windows/windowsmedia/howto/articles/codecs.aspx">Encoding Audio and Video with Windows Media Codecs</a>.</p>
<p><a href="http://alax.info/blog/wp-content/uploads/2009/08/28-image001.png"><img class="size-medium wp-image-1024 alignnone" title="Windows Media Codec List Screenshot" src="http://alax.info/blog/wp-content/uploads/2009/08/28-image001-320x171.png" alt="Windows Media Codec List Screenshot" width="320" height="171" /></a></p>
<p>Copy button copies discovered information into clipboard in comma-separated values (CSV) format (e.g. suitable fo rMicrosoft Excel). Submit button posts the same information to this website for&#8230; possibly further aggregation.</p>
<p>Some quick facts immediately visualized by the utility:</p>
<ul>
<li>for a video codec there is exactly one generic codec format listed</li>
<li>video codec FOUCCs are: WM Video &#8211; WMV1, WMV2, WMV3; WM Video Screen &#8211; MSS1, MSS2; WM Video Image &#8211; WMVP, WVP2; WM Video Advanced Profile &#8211; WVC1</li>
<li>for audio codecs there are complete codec formats enumerated, with names/descriptions suitable for GUI</li>
<li>audio codecs enumerate different formats in response to enumeration settings (e.g. request for VBR formats)</li>
<li>WM Audio Lossless only lists formats for single pass VBR mode</li>
<li>audio format tags (wFormatTag) are: WM Audio including Professional and Lossless &#8211; 0&#215;0161, 0&#215;0162, 0&#215;0163; WM Audio Voice &#8211; 0&#215;000A; ACELP.net &#8211; 0&#215;0130</li>
</ul>
<p>Partial Visual C++ .NET 2008 source code is <a href="http://code.assembla.com/roatl-utilities/subversion/nodes/trunk/WindowsMediaCodecList">available from SVN</a>, release binary <a href="http://code.assembla.com/roatl-utilities/subversion/nodes/trunk/WindowsMediaCodecList/Release/WindowsMediaCodecList.exe?format=raw">included</a>.</p>
<p><span id="more-1025"></span>See also:</p>
<ul>
<li><a href="http://en.wikipedia.org/wiki/VC-1">VC-1 on Wikipedia</a>:</li>
<li>
<blockquote><p><strong>WMV3</strong></p>
<p>Simple and Main Profiles of VC-1 remained completely faithful to the existing WMV3 implementation, making WMV3 bitstreams fully VC-1 compliant. The WMV3 codec was designed to primarily support progressive encoding for computer displays. An interlaced encoding mode was implemented, but quickly became deprecated when Microsoft started implementing WMV Advanced Profile. Whereas WMV3 progressive encoding was implemented in the YUV 4:2:0 color space, the deprecated interlaced mode was implemented in the less common YUV 4:1:1 color space.</p>
<p>The Windows Media Video 9 (WMV3) codec implements the Simple and Main modes of the VC-1 codec standard, providing high-quality video for streaming and downloading. &#8220;It provides support for a wide range of bit rates, from high-definition content at one-half to one-third the bit rate of MPEG-2, to low-bit-rate Internet video delivered over a dial-up modem. This codec also supports professional-quality downloadable video with two-pass and variable bit rate (VBR) encoding. Windows Media Video 9 is already supported by a wide variety of players and devices.&#8221;[citation needed]</p>
<p>A number of high definition movies and videos have been released commercially in a format dubbed WMV HD. These titles are encoded with WMV3 Main Profile @ High Level (MP@HL).</p>
<p>[...]</p>
<p><strong>WVC1</strong></p>
<p>WVC1, also known as Windows Media Video 9 Advanced Profile, implements a more recent and fully compliant Advanced Profile of the VC-1 codec standard. It offers support for interlaced content and is transport independent. With the previous version of the Windows Media Video 9 Series codec, users could deliver progressive content at data rates as low as one-third that of the MPEG-2 codec and still get equivalent or comparable quality to MPEG-2. The Windows Media Video 9 Advanced Profile codec also offers this same improvement in encoding efficiency with interlaced contents. A decoder for WVC1 is included in Windows Media Player 11, which is bundled with Windows Vista and is <a href="http://www.microsoft.com/downloads/details.aspx?displaylang=en&amp;FamilyID=1d224714-e238-4e45-8668-5166114010ca">available as a download for Windows XP</a>.</p></blockquote>
</li>
<li><a href="http://en.wikipedia.org/wiki/Windows_Media_Audio">Windows Media Audio on Wikipedia</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://alax.info/blog/1025/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Asus Eee PC, Tray Utility, Default Resolution</title>
		<link>http://alax.info/blog/1017</link>
		<comments>http://alax.info/blog/1017#comments</comments>
		<pubDate>Sat, 08 Aug 2009 13:39:03 +0000</pubDate>
		<dc:creator>Roman</dc:creator>
				<category><![CDATA[Source]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Utilities]]></category>
		<category><![CDATA[asus]]></category>
		<category><![CDATA[crap]]></category>
		<category><![CDATA[laptop]]></category>
		<category><![CDATA[lcd]]></category>
		<category><![CDATA[nettop]]></category>
		<category><![CDATA[resolution]]></category>
		<category><![CDATA[tray]]></category>

		<guid isPermaLink="false">http://alax.info/blog/?p=1017</guid>
		<description><![CDATA[Among things beyond of any understanding are those presented by Asustek/Asus engineers. While hardware is more or less OK, software is often confusing. Asus Eee PC 1000HE, out of which I own one, comes with Asus Eee PC Tray Utility 5.1.1.4008.

A helper application to provide quick access to certain hardware control functions, it is OK. [...]]]></description>
			<content:encoded><![CDATA[<p>Among things beyond of any understanding are those presented by <a href="http://support.asus.com">Asustek/Asus</a> engineers. While hardware is more or less OK, software is often confusing. Asus Eee PC 1000HE, out of which I own one, comes with Asus Eee PC Tray Utility 5.1.1.4008.</p>
<p><img class="alignnone size-full wp-image-1018" title="Asus Eee PC Tray Utility 5.1.1.4008" src="http://alax.info/blog/wp-content/uploads/2009/08/08-tray.png" alt="Asus Eee PC Tray Utility 5.1.1.4008" width="243" height="252" /></p>
<p>A helper application to provide quick access to certain hardware control functions, it is OK. No, you don&#8217;t have an option to close it and even if you kill it from task manager, another Asus utility will immediately relaunch it. It is a kind monther care from Asus who are just sure that they know the right way.</p>
<p>The laptop las an LCD of 1024&#215;600 pixel reoslution, and, as it usually happens, most accurate, sharp and best looking image is on the display when screen resolution is also set to 1024&#215;600. That is, one virtual screen resolution pixel that matches exactly one physical pixel on the LCD matrix. Do I  need to be so much detailed on the obvious things, because everyone knows this as it seems? Everyone but Asus engineers who for some reasons sell laptops that automatically switch to default resolution 800&#215;600. Even if you change resolution to desired one, the laptop will switch it back  sometimes when you logon, when you reboot, when you use fast switch user capability&#8230; Could it be more stupid than that? Perhaps it could, but this way it is already rather annoying.</p>
<p>After less than two months, the hotkey which switches LCD resolution sunk down while it was only used for one thing: to bring back resolution of 1024&#215;600, which beyound of any doubt had to be default resolution without any justification to fall back to a different one for no reason. The key is definitely not going to last for too long.</p>
<p><img class="alignnone size-full wp-image-1019" title="Asus Eee PC 1000HE Resolution Hotkey" src="http://alax.info/blog/wp-content/uploads/2009/08/08-img_1060a.jpg" alt="Asus Eee PC 1000HE Resolution Hotkey" width="640" height="248" /></p>
<p>Out of curiosity, I started the utility on my desktop, where it immediately blinded me by turning off both of my Asus monitors and left me no other way to press reset button to reboot the box.</p>
<p>I thought that there might be an update for the utility on Asus Support website because this kind of thing had to be fixed with apologies and sincere promises to never happen again. I was reluctant to use Asus Update utility because it is more refined masterpiece of stupidity. However on the website, there is no utility in downloads at all. It could be a part of another downloadable package, but there was also no obvious indication that would give a hint what update is required.</p>
<p>So that only solution left was to <em></em><span>anatomize the crapware and think of a workaround to at least for some time </span><span>extend the life of the hotkey. </span>The utility below, PostAsTrayCommand, will look for Asus tray icon utility to be running and will post a requested command (this way it can also be used to switch on or off wireless LAN, or the camera) to the utility.</p>
<p>To switch resolution to 1024&#215;600, a command of 32797 has to be posted. The screenshot below gives an idea of other values, which might be useful:</p>
<p><img class="alignnone size-full wp-image-1020" title="AsTray Utility Tray Icon Menu Commands" src="http://alax.info/blog/wp-content/uploads/2009/08/08-image001.png" alt="AsTray Utility Tray Icon Menu Commands" width="339" height="375" /></p>
<p>To post a command, it needs to be started from command line <em>&#8220;PostAsTrayCommand.exe 32797&#8243;</em> and it makes sense to add it to Startup group to be automatically launched on logon.</p>
<p>A Visual C++ .NET 2008 source code is <a href="http://code.assembla.com/roatl-utilities/subversion/nodes/trunk/PostAsTrayCommand">available from SVN</a>, release binary <a href="http://code.assembla.com/roatl-utilities/subversion/nodes/trunk/PostAsTrayCommand/Release/PostAsTrayCommand.exe?format=raw">included</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://alax.info/blog/1017/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MediaTools: How to manually configure filters to render M-JPEG video stream from an IP camera</title>
		<link>http://alax.info/blog/1006</link>
		<comments>http://alax.info/blog/1006#comments</comments>
		<pubDate>Wed, 05 Aug 2009 06:48:46 +0000</pubDate>
		<dc:creator>Roman</dc:creator>
				<category><![CDATA[Media Tools]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Video]]></category>
		<category><![CDATA[camera]]></category>
		<category><![CDATA[DirectShow]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[JPEG]]></category>
		<category><![CDATA[M-JPEG]]></category>
		<category><![CDATA[mediatools]]></category>
		<category><![CDATA[sample]]></category>

		<guid isPermaLink="false">http://alax.info/blog/?p=1006</guid>
		<description><![CDATA[Media Tools DirectShow Filters can be used to acquire, parse and decoder M-JPEG encoded video stream from an IP camera or a video server, however for a quick start it is necessary to properly register filters on system and create a DirectShow graph.
To register the filters, it is necessary to download DLLs from repository. While [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://alax.info/blog/category/utilities/media-tools">Media Tools</a> DirectShow Filters can be used to acquire, parse and decoder M-JPEG encoded video stream from an IP camera or a video server, however for a quick start it is necessary to properly register filters on system and create a DirectShow graph.</p>
<p>To register the filters, it is necessary to download DLLs from <a href="http://code.assembla.com/roatl-utilities/subversion/nodes/trunk/MediaTools/_Bin">repository</a>. While Acquisition.dll does not require special prerequisites installed, CodingI.dll is using <a href="http://software.intel.com/en-us/intel-ipp/">Intel Integrated Performance Primitives</a> (IPP) version 6.0.0 internally and requires its [at least] redistributables installed before DLLs are being registered using regsvr32.</p>
<p>Intel went further with new releases of IPP, which are incompatible with the version used to build CodingI.dll, so it is version 6.0.0 (in downloads on  Intel website: version 6.0 build 0) has to be installed. Note that Intel DLLs from <em>C:\Program Files\Intel\IPP\6.0.0.044\ia32\bin</em> (version 6.0.0.062 is known to be also compatible) need to be on system search path, or copied to <em>C:\Windows\system32</em> directory.</p>
<p>Once Intel IPP is prepared, it is required to register CodingI.dll using regsvr32. This registers filters and they are available in GraphEdit and for applications. It is important that on the way of constructing graph which renders video using standard video renderers it is required to specify correct resolution for video, or otherwise graph might fail to start with a message &#8220;The graph could not change state&#8221;, caused by video renderer failure to dynamically change to different (effective) resolution.</p>
<p>To create rendering graph, add Alax.Info HTTP Stream Source Filter from the filter list and provide camera URL in properties, e.g. <a href="http://cam15001.miemasu.net/nphMotionJPEG?Kind=1">http://cam15001.miemasu.net/nphMotionJPEG?Kind=1</a></p>
<p><a href="http://alax.info/blog/wp-content/uploads/2009/08/03-image001.png"><img class="alignnone size-medium wp-image-1007" title="Adding Alax.Info HTTP Stream Source Filter" src="http://alax.info/blog/wp-content/uploads/2009/08/03-image001-320x151.png" alt="Adding Alax.Info HTTP Stream Source Filter" width="320" height="151" /></a></p>
<p><span id="more-1006"></span>Add more filters and provide proper resolution for video:</p>
<p><a href="http://alax.info/blog/wp-content/uploads/2009/08/03-image002.png"><img class="alignnone size-medium wp-image-1008" title="Alax.Info JPEG Frame Decoder Filter" src="http://alax.info/blog/wp-content/uploads/2009/08/03-image002-320x151.png" alt="Alax.Info JPEG Frame Decoder Filter" width="320" height="151" /></a></p>
<p>Complete graph construction with resolution set up:</p>
<p><a href="http://alax.info/blog/wp-content/uploads/2009/08/03-image003.png"><img class="alignnone size-medium wp-image-1009" title="Render Alax.Info JPEG Decoder Filter output pin" src="http://alax.info/blog/wp-content/uploads/2009/08/03-image003-320x151.png" alt="Render Alax.Info JPEG Decoder Filter output pin" width="320" height="151" /></a></p>
<p>Being run, the graph shows video:</p>
<p><a href="http://alax.info/blog/wp-content/uploads/2009/08/03-image004.png"><img class="alignnone size-medium wp-image-1010" title="Video from cam15001.miemasu.net camera through Alax.Info DirectShow filters" src="http://alax.info/blog/wp-content/uploads/2009/08/03-image004-320x151.png" alt="Video from cam15001.miemasu.net camera through Alax.Info DirectShow filters" width="320" height="151" /></a></p>
<p>Dynamic handling of resolution selection, configuration and change is also illustrated in sample application <a href="http://code.assembla.com/roatl-utilities/subversion/nodes/trunk/MediaTools/Samples/RenderHttpMjpegVideo01">RenderHttpMjpegVideo01</a>.</p>
<p>NOTE: The constructed graph .GRF file is <a href="http://alax.info/blog/wp-content/uploads/2009/08/cam15001miemasunet.grf">available for download</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://alax.info/blog/1006/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>DirectShow Filter Graph Spy on Vista</title>
		<link>http://alax.info/blog/944</link>
		<comments>http://alax.info/blog/944#comments</comments>
		<pubDate>Mon, 22 Jun 2009 08:36:15 +0000</pubDate>
		<dc:creator>Roman</dc:creator>
				<category><![CDATA[Utilities]]></category>
		<category><![CDATA[ATL]]></category>
		<category><![CDATA[C++]]></category>
		<category><![CDATA[COM]]></category>
		<category><![CDATA[DirectShow]]></category>
		<category><![CDATA[filter]]></category>
		<category><![CDATA[graph]]></category>
		<category><![CDATA[registry]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[Source]]></category>
		<category><![CDATA[spy]]></category>
		<category><![CDATA[Vista]]></category>

		<guid isPermaLink="false">http://alax.info/blog/?p=944</guid>
		<description><![CDATA[I have been receiving comments that Filter Graph Spy tool does not work with Microsoft Vista operating system. I never had a moment to check until recently, and this time I realized that it really does not work. I am definitely aware of dramatic changes introduced with this operating system, and in particular UAC feature, [...]]]></description>
			<content:encoded><![CDATA[<p>I have been receiving comments that <a href="http://alax.info/blog/777">Filter Graph Spy</a> tool does not work with Microsoft Vista operating system. I never had a moment to check until recently, and this time I realized that it really does not work. I am definitely aware of dramatic changes introduced with this operating system, and in particular UAC feature, virtualization and changes in security. No wonder this was the first guess that security was the cause, however the investigation showed there was a trail of issues underneath&#8230;</p>
<p>Investigation details deserve a separate post, while this one briefly outlines the issues and also accompany the repository update with a version compatible with Vista OS.</p>
<p>First of all, COM registration of the DLL (which definitely requires privilege elevation) succeeded on Vista. This means the registration procedure did not encounter any errors on the way, or poorly written code ignored the problem. It appeared that the source of the problem was <a href="http://msdn.microsoft.com/en-us/library/ms693452(VS.85).aspx">CoTreatAsClass</a> API, which failed to do the requested action, however returned status code indicating successful operation. This definitely looks like a bug and further comments on this particular behavior are expected to appear on <a href="http://social.msdn.microsoft.com/Forums/en-US/windowssecurity/threads/">Windows Applications Security MSDN forum</a>, where I opened <a href="http://social.msdn.microsoft.com/Forums/en-US/windowssecurity/thread/583793b8-a73c-4cb5-ae8c-a3620203aed9">a topic on the matter</a>.</p>
<p>With a COM TreatAs feature activated, the class&#8217;s behavior to instantiate instead of DirectShow&#8217;s CLSID_FilterGraph is restored, and in particular the DLL generates <em>FilterGraphSpy.log</em> log file on filter graph activity. Note that log file location is OS dependent (due to Vista&#8217;s permissions and file system virtualization):</p>
<ul>
<li>pre-Vista OS: root of syste drive, typically <em>C:\</em></li>
<li>starting Vista, administrator with elevated privileges: <em>CSIDL_COMMON_APPDATA</em>, typically <em>C:\ProgramData</em> (note this directory is hidden by deafult)</li>
<li>starting Vista, without elevated administrator privileges: <em>CSIDL_LOCAL_APPDATA</em>, typically <em>C:\Users\$(UserName)\AppData\Local</em> (note that <em>AppData</em> directory is hidden by deafult)</li>
</ul>
<p>Still even with the log file generated and indicating activation of the spy, it was unable to connect to remote graph through the running object table (ROT). It appeared that the ROT entires are there where expected, it was OK to get an object from ROT and the problem came from QueryInterface code:</p>
<pre>CComPtr<span style="color: #800080;">&lt;</span>IUnknown<span style="color: #800080;">&gt;</span> pFilterGraphUnknown<span style="color: #800080;">;</span>
ATLENSURE_SUCCEEDED<span style="color: #808030;">(</span>pRunningObjectTable<span style="color: #808030;">-</span><span style="color: #808030;">&gt;</span><span style="color: #400000;">GetObject</span><span style="color: #808030;">(</span>pMoniker<span style="color: #808030;">,</span> <span style="color: #808030;">&amp;</span>pFilterGraphUnknown<span style="color: #808030;">)</span><span style="color: #808030;">)</span><span style="color: #800080;">;</span>
CComQIPtr<span style="color: #800080;">&lt;</span>IMyFilterGraph<span style="color: #800080;">&gt;</span> pFilterGraph <span style="color: #808030;">=</span> pFilterGraphUnknown<span style="color: #800080;">;</span> <span style="color: #696969;">// <span style="color: #ff0000;">E_NOINTERFACE</span></span></pre>
<p>The call reached the original object but COM subsystem was unable to marshal the interface through apartments to enable interprocess communication on it. The reason for this is absence of <em>PSFactoryBuffer</em> class (CLSID {92A3A302-DA7C-4A1F-BA7E-1802BB5D2D02}), which provides proxy/stub pairs for marshaling well known DirectShow interfaces in the Vista&#8217;s version of <em>quartz.dll</em>. <a href="http://social.msdn.microsoft.com/Forums/en-US/windowsdirectshowdevelopment/thread/5079f1c5-1275-4449-a11c-3cbb820e33eb">As mentioned by Microsoft&#8217;s Mike Wasson</a>, this class was moved from <em>quartz.dll</em> into Vista SDK&#8217;s <em>proppage.dll</em>, so in order to obtain connectivity to remote DirectShow graphs starting Vista, one needs to install this DLL with <a href="http://www.microsoft.com/downloads/details.aspx?FamilyId=E6E1C3DF-A74F-4207-8586-711EBE331CDC&amp;displaylang=en">Windows SDK</a>, or otherwise have it registered with the operating system.</p>
<p>Also note that DirectShow-enabled applications that have their filter graphs published on ROT will need an utility application such as <a href="http://msdn.microsoft.com/en-us/library/ms787460(VS.85).aspx">GraphEdit</a> started with the same permissions (elevated or not) in order to be able to access ROT entires.</p>
<div style="background-color: #efa; border: 1px solid #ffc; padding: 2px; ">To sum everything up, to install Alax.Info DirectShow Filter Graph Spy on Vista:<br/></p>
<ul>
<li>get the latest <em>FilterGraphSpy.dll</em></li>
<li>regsvr32 <em>FilterGraphSpy.dll</em> on target system from administrative command prompt, with elevated privileges (note you should have a log file <em>FilterGraphSpy.log</em> generated in CSIDL_COMMON_APPDATA directory, with a few lines indicating registration success)</li>
<li>get <a href="http://www.microsoft.com/downloads/details.aspx?FamilyId=E6E1C3DF-A74F-4207-8586-711EBE331CDC&amp;displaylang=en">Windows SDK</a> and make <em>$(WindowsSDK)\Bin\proppage.dll</em> file registered on target system (also administrative regsvr32), note that it is necessary to restart DirectShow-enabled applications and GraphEdit after DLL registration to get graphs visible through ROT</li>
<li>mind the log file directories with <em>FilterGraphSpy.log</em> file</li>
</ul>
</div>
<p>A partial Visual C++ .NET 2008 source code is <a href="http://code.assembla.com/roatl-utilities/subversion/nodes/trunk/FilterGraphSpy">available from SVN</a>, release binary <a href="http://code.assembla.com/roatl-utilities/subversion/nodes/trunk/FilterGraphSpy/Release%20Trace/FilterGraphSpy.dll?format=raw">included</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://alax.info/blog/944/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>DHCP Server: List of Issued Leases</title>
		<link>http://alax.info/blog/940</link>
		<comments>http://alax.info/blog/940#comments</comments>
		<pubDate>Sat, 13 Jun 2009 19:47:38 +0000</pubDate>
		<dc:creator>Roman</dc:creator>
				<category><![CDATA[DHCP Server]]></category>
		<category><![CDATA[DHCP]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[utility]]></category>

		<guid isPermaLink="false">http://alax.info/blog/?p=940</guid>
		<description><![CDATA[Alax.Info DHCP Server was updated to provide user interface and show a list of issued DHCP leases, including:

hardware (MAC) address and IP address correspondence
latest date and time of DHCP lease issue
sortable list to be able to conveniently arrange entries and lookup items of interest


Other changes include:

stores latest lease issue date and time in registry to [...]]]></description>
			<content:encoded><![CDATA[<p>Alax.Info DHCP Server was updated to provide user interface and show a list of issued <a href="http://en.wikipedia.org/wiki/Dynamic_Host_Configuration_Protocol">DHCP</a> leases, including:</p>
<ul>
<li>hardware (<a href="http://en.wikipedia.org/wiki/MAC_address">MAC</a>) address and IP address correspondence</li>
<li>latest date and time of DHCP lease issue</li>
<li>sortable list to be able to conveniently arrange entries and lookup items of interest</li>
</ul>
<p><img class="alignnone size-full wp-image-941" title="DHCP Lease List" src="http://alax.info/blog/wp-content/uploads/2009/06/13-image001.png" alt="DHCP Lease List" width="367" height="426" /></p>
<p>Other changes include:</p>
<ul>
<li>stores latest lease issue date and time in registry to be able to locate recently issued leases</li>
<li>indicates Windows service status through system tray icon (running or stopped)</li>
<li>minor fixes</li>
</ul>
<p>Release information:</p>
<ul>
<li>Updated Version: 1.0.4</li>
<li>Download Link: <a href="/blog-dist/AlaxInfoDhcpServerSetup.msi">AlaxInfoDhcpServerSetup.msi</a> (368K)</li>
<li>Registration Cart: <a href="http://www.shareit.com/product.html?cart=1&amp;productid=300177947">http://www.shareit.com/product.html</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://alax.info/blog/940/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Hint on how to easily find your filter graph on running object table (ROT)</title>
		<link>http://alax.info/blog/930</link>
		<comments>http://alax.info/blog/930#comments</comments>
		<pubDate>Thu, 11 Jun 2009 13:14:21 +0000</pubDate>
		<dc:creator>Roman</dc:creator>
				<category><![CDATA[ATL]]></category>
		<category><![CDATA[Utilities]]></category>
		<category><![CDATA[DirectShow]]></category>
		<category><![CDATA[filter]]></category>
		<category><![CDATA[graph]]></category>
		<category><![CDATA[graphedit]]></category>
		<category><![CDATA[graphstudio]]></category>
		<category><![CDATA[moniker]]></category>
		<category><![CDATA[rot]]></category>
		<category><![CDATA[spy]]></category>

		<guid isPermaLink="false">http://alax.info/blog/?p=930</guid>
		<description><![CDATA[With a lot of DirectShow Filter Graphs published on Running Object Table, especially those automatically published by Filter Graph Spy utility, it might be a bit tricky to locate your graph of interest in the list.
Filter graphs are published with a textual moniker item name of predefined format, which is recognized by GraphEdit or GraphStudio, [...]]]></description>
			<content:encoded><![CDATA[<p>With a lot of <a href="http://msdn.microsoft.com/en-us/library/dd407188(VS.85).aspx">DirectShow Filter Graphs</a> published on <a href="http://msdn.microsoft.com/en-us/library/ms684004(VS.85).aspx">Running Object Table</a>, especially those automatically published by <a href="http://alax.info/blog/793">Filter Graph Spy utility</a>, it might be a bit tricky to locate your graph of interest in the list.</p>
<p>Filter graphs are published with a textual <a href="http://msdn.microsoft.com/en-us/library/ms680140(VS.85).aspx">moniker item name</a> of predefined format, which is recognized by <a href="http://msdn.microsoft.com/en-us/library/ms787460(VS.85).aspx">GraphEdit</a> or <a href="http://blog.monogram.sk/janos/tools/monogram-graphstudio/">GraphStudio</a>, or similar utilities as an item corresponding to a filter graph. A template for such a string is &#8220;<em>FilterGraph %08x pid %08x</em>&#8220;, which obviously only contains raw pointer address and process identifier, which only help a bit in looking up for proper graph interactively. However, it is important how exactly applications are recognizing filter graph related names. For example, GraphStudio <a href="http://dev.monogram.sk/websvn/listing.php?repname=graphstudio">does it</a> the following way:</p>
<pre>rot<span style="color: #808030;">-</span><span style="color: #808030;">&gt;</span>EnumRunning<span style="color: #808030;">(</span><span style="color: #808030;">&amp;</span>emon<span style="color: #808030;">)</span><span style="color: #800080;">;</span>
emon<span style="color: #808030;">-</span><span style="color: #808030;">&gt;</span>Reset<span style="color: #808030;">(</span><span style="color: #808030;">)</span><span style="color: #800080;">;</span>
<span style="color: #800000; font-weight: bold;">while</span> <span style="color: #808030;">(</span>emon<span style="color: #808030;">-</span><span style="color: #808030;">&gt;</span>Next<span style="color: #808030;">(</span><span style="color: #008c00;">1</span><span style="color: #808030;">,</span> <span style="color: #808030;">&amp;</span>moniker<span style="color: #808030;">,</span> <span style="color: #808030;">&amp;</span>f<span style="color: #808030;">)</span> <span style="color: #808030;">=</span><span style="color: #808030;">=</span> NOERROR<span style="color: #808030;">)</span> <span style="color: #800080;">{</span>

    <span style="color: #696969;">// is this a graph object ?</span>
    LPOLESTR    displayname<span style="color: #800080;">;</span>
    moniker<span style="color: #808030;">-</span><span style="color: #808030;">&gt;</span>GetDisplayName<span style="color: #808030;">(</span>bindctx<span style="color: #808030;">,</span> <span style="color: #7d0045;">NULL</span><span style="color: #808030;">,</span> <span style="color: #808030;">&amp;</span>displayname<span style="color: #808030;">)</span><span style="color: #800080;">;</span>

    <span style="color: #603000;">CString</span>        name<span style="color: #808030;">(</span>displayname<span style="color: #808030;">)</span><span style="color: #800080;">;</span>
    <span style="color: #800000; font-weight: bold;">if</span> <span style="color: #808030;">(</span>name<span style="color: #808030;">.</span>Find<span style="color: #808030;">(</span>_T<span style="color: #808030;">(</span><span style="color: #800000;">"</span><span style="color: #0000e6;">!FilterGraph</span><span style="color: #800000;">"</span><span style="color: #808030;">)</span><span style="color: #808030;">)</span> <span style="color: #808030;">=</span><span style="color: #808030;">=</span> <span style="color: #008c00;">0</span><span style="color: #808030;">)</span> <span style="color: #800080;">{</span></pre>
<p>The items that match are then listed in GUI with an original string, which means that it is possible to provide an informational suffix to be able to locate the graph in a more convenient way, e.g. with a process image name, not only identifier (&#8221;; process: &#8230;&#8221; was appended to the item name):</p>
<p><img class="alignnone size-full wp-image-932" title="GraphStudio's ROT Items" src="http://alax.info/blog/wp-content/uploads/2009/06/11-image001.png" alt="GraphStudio's ROT Items" width="400" height="249" /></p>
<p>GraphEdit is using another method and is more strict in selecting among available items. AFAIR earlier versions did not allow custom suffixes in item names, however the latest version still picks the items up from the global list. However, GraphEdit does not show graph&#8217;s original item name, so suffixes are merely useless with GraphEdit.</p>
<p><img class="alignnone size-full wp-image-933" title="GraphEdit ROT Items" src="http://alax.info/blog/wp-content/uploads/2009/06/11-image002.png" alt="GraphEdit ROT Items" width="314" height="215" /></p>
<p><a href="http://alax.info/blog/793">Filter Graph Spy utility</a> was updated to automatically append process name suffix, which should be OK for both GrapEdit and GraphStudio. Still, the feature can be disabled through registry DWORD value named &#8220;<em>Enable ROT Moniker Item Name Suffix</em>&#8221; under <em>HKEY_LOCAL_MACHINE\SOFTWARE\Alax.Info\Utilities</em>. The value of zero, or missing, is the default behavior to enable suffixes. The value of 1 disables the feature, the value of 2 makes sure it is enabled.</p>
<pre><span style="color: #800000; font-weight: bold;">static</span> CConstIntegerRegistryValue g_nEnableRotMonikerItemNameSuffix<span style="color: #808030;">(</span>_T<span style="color: #808030;">(</span><span style="color: #800000;">"</span><span style="color: #0000e6;">Enable ROT Moniker Item Name Suffix</span><span style="color: #800000;">"</span><span style="color: #808030;">)</span><span style="color: #808030;">)</span><span style="color: #800080;">;</span> <span style="color: #696969;">// 0 Default, 1 Disable, 2 Enable</span>
<span style="color: #800000; font-weight: bold;">if</span><span style="color: #808030;">(</span>g_nEnableRotMonikerItemNameSuffix <span style="color: #808030;">!</span><span style="color: #808030;">=</span> <span style="color: #008c00;">1</span><span style="color: #808030;">)</span>
<span style="color: #800080;">{</span>
    <span style="color: #603000;">TCHAR</span> pszPath<span style="color: #808030;">[</span>MAX_PATH<span style="color: #808030;">]</span> <span style="color: #808030;">=</span> <span style="color: #800080;">{</span> <span style="color: #008c00;">0</span> <span style="color: #800080;">}</span><span style="color: #800080;">;</span>
    _W<span style="color: #808030;">(</span><span style="color: #400000;">GetModuleFileName</span><span style="color: #808030;">(</span><span style="color: #7d0045;">NULL</span><span style="color: #808030;">,</span> pszPath<span style="color: #808030;">,</span> DIM<span style="color: #808030;">(</span>pszPath<span style="color: #808030;">)</span><span style="color: #808030;">)</span><span style="color: #808030;">)</span><span style="color: #800080;">;</span>
    <span style="color: #603000;">CString</span> sItemName <span style="color: #808030;">=</span> AtlFormatString<span style="color: #808030;">(</span>_T<span style="color: #808030;">(</span><span style="color: #800000;">"</span><span style="color: #0f69ff;">%s</span><span style="color: #0000e6;">; process: </span><span style="color: #0f69ff;">%s</span><span style="color: #800000;">"</span><span style="color: #808030;">)</span><span style="color: #808030;">,</span> m_RunningFilterGraph<span style="color: #808030;">.</span>GetDefaultMonikerItemName<span style="color: #808030;">(</span>GetControllingUnknown<span style="color: #808030;">(</span><span style="color: #808030;">)</span><span style="color: #808030;">)</span><span style="color: #808030;">,</span> FindFileName<span style="color: #808030;">(</span>pszPath<span style="color: #808030;">)</span><span style="color: #808030;">)</span><span style="color: #800080;">;</span>
    m_RunningFilterGraph<span style="color: #808030;">.</span>SetFilterGraph<span style="color: #808030;">(</span>GetControllingUnknown<span style="color: #808030;">(</span><span style="color: #808030;">)</span><span style="color: #808030;">,</span> CStringW<span style="color: #808030;">(</span>sItemName<span style="color: #808030;">)</span><span style="color: #808030;">)</span><span style="color: #800080;">;</span>
<span style="color: #800080;">}</span> <span style="color: #800000; font-weight: bold;">else</span>
    m_RunningFilterGraph<span style="color: #808030;">.</span>SetFilterGraph<span style="color: #808030;">(</span>GetControllingUnknown<span style="color: #808030;">(</span><span style="color: #808030;">)</span><span style="color: #808030;">)</span></pre>
<p>A partial Visual C++ .NET 2008 source code is <a href="http://code.assembla.com/roatl-utilities/subversion/nodes/trunk/FilterGraphSpy">available from SVN</a>, release binary <a href="http://code.assembla.com/roatl-utilities/subversion/nodes/trunk/FilterGraphSpy/Release%20Trace/FilterGraphSpy.dll?format=raw">included</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://alax.info/blog/930/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
