<?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; camera</title>
	<atom:link href="http://alax.info/blog/tag/camera/feed" rel="self" type="application/rss+xml" />
	<link>http://alax.info/blog</link>
	<description>// Software Production Line</description>
	<lastBuildDate>Fri, 03 Feb 2012 22:49:15 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Using IP Video Source programmatically as a standalone DirectShow Video Source Filter for JPEG and M-JPEG IP Cameras</title>
		<link>http://alax.info/blog/1241</link>
		<comments>http://alax.info/blog/1241#comments</comments>
		<pubDate>Sun, 17 Jul 2011 18:22:04 +0000</pubDate>
		<dc:creator>Roman</dc:creator>
				<category><![CDATA[Utilities]]></category>
		<category><![CDATA[C++]]></category>
		<category><![CDATA[camera]]></category>
		<category><![CDATA[JPEG]]></category>
		<category><![CDATA[M-JPEG]]></category>
		<category><![CDATA[panasonic]]></category>
		<category><![CDATA[sample]]></category>
		<category><![CDATA[Video]]></category>

		<guid isPermaLink="false">http://alax.info/blog/?p=1241</guid>
		<description><![CDATA[<a href="http://alax.info/blog/1241" title="Using IP Video Source programmatically as a standalone DirectShow Video Source Filter for JPEG and M-JPEG IP Cameras"></a>Recent IP Video Source class/module is not limited to use via registration as a video input/capture/source device. The filter is also registered as a regular filter and can be used programmatically in a regular way: CoCreateInstance, AddFilter etc. A C++ &#8230;<p class="read-more"><a href="http://alax.info/blog/1241">Read more &#187;</a></p>]]></description>
			<content:encoded><![CDATA[<a href="http://alax.info/blog/1241" title="Using IP Video Source programmatically as a standalone DirectShow Video Source Filter for JPEG and M-JPEG IP Cameras"></a><p>Recent <a href="http://alax.info/blog/1216">IP Video Source</a> class/module is not limited to use via registration as a video input/capture/source device. The filter is also registered as a regular filter and can be used programmatically in a regular way: <a href="http://msdn.microsoft.com/en-us/library/ms686615%28VS.85%29.aspx">CoCreateInstance</a>, <a href="http://msdn.microsoft.com/en-us/library/dd390016%28VS.85%29.aspx">AddFilter</a> etc.</p>
<p>A C++ code snippet below shows how to import interface definition, create an instance of the filter, set it up and start video from a camera:</p>
<pre style="color: #000000; background: #ffffff;"><span style="color: #004a43;">#</span><span style="color: #004a43;">include </span><span style="color: #800000;">&lt;</span><span style="color: #40015a;">dshow.h</span><span style="color: #800000;">&gt;</span>
<span style="color: #004a43;">#</span><span style="color: #004a43; font-weight: bold;">pragma </span><span style="color: #bb7977; font-weight: bold;">comment(lib, </span><span style="color: #0000e6; font-weight: bold;">"strmiids.lib"</span><span style="color: #bb7977; font-weight: bold;">)</span>

<span style="color: #004a43;">#import </span><span style="color: #800000;">"</span><span style="color: #0000e6;">libid:BDCE8B49-8895-4605-8278-E9A1FBC889AC</span><span style="color: #800000;">"</span><span style="color: #004a43;"> no_namespace raw_interfaces_only raw_dispinterfaces named_guids </span><span style="color: #696969;">// IpVideoSource</span>

<span style="color: #696969;">// [...]</span>

<span style="color: #800000; font-weight: bold;">inline</span> <span style="color: #603000;">VOID</span> ATLENSURE_INLINE_SUCCEEDED<span style="color: #808030;">(</span>HRESULT nResult<span style="color: #808030;">)</span>
<span style="color: #800080;">{</span>
    ATLENSURE_SUCCEEDED<span style="color: #808030;">(</span>nResult<span style="color: #808030;">)</span><span style="color: #800080;">;</span>
<span style="color: #800080;">}</span>

<span style="color: #696969;">// [...]</span>

CComPtr<span style="color: #800080;">&lt;</span>IBaseFilter<span style="color: #800080;">&gt;</span> pBaseFilter<span style="color: #800080;">;</span>
ATLENSURE_INLINE_SUCCEEDED<span style="color: #808030;">(</span>pBaseFilter<span style="color: #808030;">.</span>CoCreateInstance<span style="color: #808030;">(</span>CLSID_JpegVideoSourceFilter<span style="color: #808030;">)</span><span style="color: #808030;">)</span><span style="color: #800080;">;</span>
CComQIPtr<span style="color: #800080;">&lt;</span>IJpegVideoSourceFilter<span style="color: #800080;">&gt;</span> pJpegVideoSourceFilter <span style="color: #808030;">=</span> pBaseFilter<span style="color: #800080;">;</span>
ATLENSURE_THROW<span style="color: #808030;">(</span>pJpegVideoSourceFilter<span style="color: #808030;">,</span> E_NOINTERFACE<span style="color: #808030;">)</span><span style="color: #800080;">;</span>
ATLENSURE_INLINE_SUCCEEDED<span style="color: #808030;">(</span>pFilterGraph<span style="color: #808030;">-</span><span style="color: #808030;">&gt;</span>AddFilter<span style="color: #808030;">(</span>pBaseFilter<span style="color: #808030;">,</span> <span style="color: #800000;">L"</span><span style="color: #0000e6;">Source</span><span style="color: #800000;">"</span><span style="color: #808030;">)</span><span style="color: #808030;">)</span><span style="color: #800080;">;</span>

ATLENSURE_INLINE_SUCCEEDED<span style="color: #808030;">(</span>pJpegVideoSourceFilter<span style="color: #808030;">-</span><span style="color: #808030;">&gt;</span>put_Location<span style="color: #808030;">(</span>CComBSTR<span style="color: #808030;">(</span>_T<span style="color: #808030;">(</span><span style="color: #800000;">"</span><span style="color: #0000e6;">http://p.viewnetcam.com:60001/nphMotionJpeg?Resolution=640x480&amp;Quality=Standard</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: #800080;">;</span>
ATLENSURE_INLINE_SUCCEEDED<span style="color: #808030;">(</span>pJpegVideoSourceFilter<span style="color: #808030;">-</span><span style="color: #808030;">&gt;</span>put_Width<span style="color: #808030;">(</span><span style="color: #008c00;">640</span><span style="color: #808030;">)</span><span style="color: #808030;">)</span><span style="color: #800080;">;</span>
ATLENSURE_INLINE_SUCCEEDED<span style="color: #808030;">(</span>pJpegVideoSourceFilter<span style="color: #808030;">-</span><span style="color: #808030;">&gt;</span>put_Height<span style="color: #808030;">(</span><span style="color: #008c00;">480</span><span style="color: #808030;">)</span><span style="color: #808030;">)</span><span style="color: #800080;">;</span>

<span style="color: #004a43;">#</span><span style="color: #004a43; font-weight: bold;">pragma </span><span style="color: #bb7977; font-weight: bold;">region Render Output Pin</span>
CComPtr<span style="color: #800080;">&lt;</span>IEnumPins<span style="color: #800080;">&gt;</span> pEnumPins<span style="color: #800080;">;</span>
ATLENSURE_INLINE_SUCCEEDED<span style="color: #808030;">(</span>pBaseFilter<span style="color: #808030;">-</span><span style="color: #808030;">&gt;</span>EnumPins<span style="color: #808030;">(</span><span style="color: #808030;">&amp;</span>pEnumPins<span style="color: #808030;">)</span><span style="color: #808030;">)</span><span style="color: #800080;">;</span>
CComPtr<span style="color: #800080;">&lt;</span>IPin<span style="color: #800080;">&gt;</span> pPin<span style="color: #800080;">;</span>
ATLENSURE_THROW<span style="color: #808030;">(</span>pEnumPins<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>pPin<span style="color: #808030;">,</span> <span style="color: #7d0045;">NULL</span><span style="color: #808030;">)</span> <span style="color: #808030;">=</span><span style="color: #808030;">=</span> S_OK<span style="color: #808030;">,</span> E_FAIL<span style="color: #808030;">)</span><span style="color: #800080;">;</span>
ATLASSERT<span style="color: #808030;">(</span>pPin<span style="color: #808030;">)</span><span style="color: #800080;">;</span>
ATLENSURE_INLINE_SUCCEEDED<span style="color: #808030;">(</span>pFilterGraph<span style="color: #808030;">-</span><span style="color: #808030;">&gt;</span>Render<span style="color: #808030;">(</span>pPin<span style="color: #808030;">)</span><span style="color: #808030;">)</span><span style="color: #800080;">;</span>
<span style="color: #004a43;">#</span><span style="color: #004a43; font-weight: bold;">pragma </span><span style="color: #bb7977; font-weight: bold;">endregion</span></pre>
<p>This starts M-JPEG video from Panasonic BB-HCM381A camera available to public online at http://p.viewnetcam.com:60001/nphMotionJpeg?Resolution=640&#215;480&amp;Quality=Standard</p>
<p>UPDATE: ATLENSURE_SUCCEEDED macro in the snippet replaced with ATLENSURE_INLINE_SUCCEEDED &#8211; see additional post on this.</p>
<p>C#.NET code snippet will look like this (using <a href="http://directshownet.sourceforge.net/">DirectShowLib</a>):</p>
<pre style="color: #000000; background: #ffffff;"><span style="color: #800000; font-weight: bold;">using</span> DirectShowLib<span style="color: #800080;">;</span>
<span style="color: #800000; font-weight: bold;">using</span> AlaxInfoIpVideoSource<span style="color: #800080;">;</span>

<span style="color: #696969;">// [...]</span>

FilterGraph filterGraph <span style="color: #808030;">=</span> <span style="color: #800000; font-weight: bold;">new</span> FilterGraph<span style="color: #808030;">(</span><span style="color: #808030;">)</span><span style="color: #800080;">;</span>
IJpegVideoSourceFilter sourceFilter <span style="color: #808030;">=</span> Activator<span style="color: #808030;">.</span>CreateInstance<span style="color: #808030;">(</span>Type<span style="color: #808030;">.</span>GetTypeFromCLSID<span style="color: #808030;">(</span><span style="color: #800000; font-weight: bold;">new</span> Guid<span style="color: #808030;">(</span><span style="color: #800000;">"</span><span style="color: #0000e6;">{A8DA2ECB-DEF6-414D-8CE2-E651640DBA4F}</span><span style="color: #800000;">"</span><span style="color: #808030;">)</span><span style="color: #808030;">)</span><span style="color: #808030;">)</span> <span style="color: #800000; font-weight: bold;">as</span> IJpegVideoSourceFilter<span style="color: #800080;">;</span>
IBaseFilter sourceBaseFilter <span style="color: #808030;">=</span> sourceFilter <span style="color: #800000; font-weight: bold;">as</span> IBaseFilter<span style="color: #800080;">;</span>
<span style="color: #808030;">(</span>filterGraph <span style="color: #800000; font-weight: bold;">as</span> IFilterGraph2<span style="color: #808030;">)</span><span style="color: #808030;">.</span>AddFilter<span style="color: #808030;">(</span>sourceBaseFilter<span style="color: #808030;">,</span> <span style="color: #800000;">"</span><span style="color: #0000e6;">Source</span><span style="color: #800000;">"</span><span style="color: #808030;">)</span><span style="color: #800080;">;</span>
sourceFilter<span style="color: #808030;">.</span>Location <span style="color: #808030;">=</span> @<span style="color: #800000;">"</span><span style="color: #0000e6;">http://p.viewnetcam.com:60001/nphMotionJpeg?Resolution=640x480&amp;Quality=Standard</span><span style="color: #800000;">"</span><span style="color: #800080;">;</span>
sourceFilter<span style="color: #808030;">.</span>Width <span style="color: #808030;">=</span> <span style="color: #008c00;">640</span><span style="color: #800080;">;</span>
sourceFilter<span style="color: #808030;">.</span>Height <span style="color: #808030;">=</span> <span style="color: #008c00;">480</span><span style="color: #800080;">;</span>
IPin pin <span style="color: #808030;">=</span> DsFindPin<span style="color: #808030;">.</span>ByDirection<span style="color: #808030;">(</span>sourceBaseFilter<span style="color: #808030;">,</span> PinDirection<span style="color: #808030;">.</span>Output<span style="color: #808030;">,</span> <span style="color: #008c00;">0</span><span style="color: #808030;">)</span><span style="color: #800080;">;</span>
<span style="color: #808030;">(</span>filterGraph <span style="color: #800000; font-weight: bold;">as</span> IFilterGraph2<span style="color: #808030;">)</span><span style="color: #808030;">.</span>Render<span style="color: #808030;">(</span>pin<span style="color: #808030;">)</span><span style="color: #800080;">;</span>
<span style="color: #808030;">(</span>filterGraph <span style="color: #800000; font-weight: bold;">as</span> IMediaControl<span style="color: #808030;">)</span><span style="color: #808030;">.</span>Run<span style="color: #808030;">(</span><span style="color: #808030;">)</span><span style="color: #800080;">;</span>
EventCode eventCode<span style="color: #800080;">;</span>
<span style="color: #808030;">(</span>filterGraph <span style="color: #800000; font-weight: bold;">as</span> IMediaEvent<span style="color: #808030;">)</span><span style="color: #808030;">.</span>WaitForCompletion<span style="color: #808030;">(</span><span style="color: #808030;">-</span><span style="color: #008c00;">1</span><span style="color: #808030;">,</span> <span style="color: #800000; font-weight: bold;">out</span> eventCode<span style="color: #808030;">)</span><span style="color: #800080;">;</span></pre>
]]></content:encoded>
			<wfw:commentRss>http://alax.info/blog/1241/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>IP Video Source: Pure JPEG URLs and Software Version</title>
		<link>http://alax.info/blog/1227</link>
		<comments>http://alax.info/blog/1227#comments</comments>
		<pubDate>Tue, 07 Jun 2011 19:02:47 +0000</pubDate>
		<dc:creator>Roman</dc:creator>
				<category><![CDATA[Utilities]]></category>
		<category><![CDATA[camera]]></category>
		<category><![CDATA[capture]]></category>
		<category><![CDATA[device]]></category>
		<category><![CDATA[DirectShow]]></category>
		<category><![CDATA[driver]]></category>
		<category><![CDATA[dshow]]></category>
		<category><![CDATA[filter]]></category>
		<category><![CDATA[ip]]></category>
		<category><![CDATA[JPEG]]></category>
		<category><![CDATA[M-JPEG]]></category>
		<category><![CDATA[Source]]></category>
		<category><![CDATA[Video]]></category>

		<guid isPermaLink="false">http://alax.info/blog/?p=1227</guid>
		<description><![CDATA[<a href="http://alax.info/blog/1227" title="IP Video Source: Pure JPEG URLs and Software Version"></a>This does not update the software with new features, but there are a few simple things worth mentioning explicitly. The first is that virtual DirectShow camera device can be set up with both M-JPEG and JPEG URLs. That is, IP &#8230;<p class="read-more"><a href="http://alax.info/blog/1227">Read more &#187;</a></p>]]></description>
			<content:encoded><![CDATA[<a href="http://alax.info/blog/1227" title="IP Video Source: Pure JPEG URLs and Software Version"></a><p>This does not update the software with new features, but there are a few simple things worth mentioning explicitly.</p>
<p>The first is that virtual DirectShow camera device can be set up with both M-JPEG and JPEG URLs. That is, IP cameras which do not implement M-JPEG, or implement it in a buggy way (there is a *huge* deal of such out there) can still be set up to send video as individual video frames/images as long as they implement JPEG snapshots. This is taking place often at a lower frame rate, but still works.</p>
<p>The driver will automatically detect type of URL (by response from the device) and will choose best access method for the given URL.</p>
<p>Second is that if you are looking for IP Video Source software version, such as to check against available updates, it is here on the UI (right click the caption):</p>
<p><img class="alignnone size-full wp-image-1228" title="About on System Menu" src="http://alax.info/blog/wp-content/uploads/2011/06/Image004.png" alt="" width="563" height="430" /></p>
<p><img class="alignnone size-full wp-image-1229" title="About and Version" src="http://alax.info/blog/wp-content/uploads/2011/06/Image005.png" alt="" width="436" height="294" /></p>
]]></content:encoded>
			<wfw:commentRss>http://alax.info/blog/1227/feed</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>IP Video Source: 64-bit version, resolution flexibility, Adobe FMLE</title>
		<link>http://alax.info/blog/1223</link>
		<comments>http://alax.info/blog/1223#comments</comments>
		<pubDate>Sun, 05 Jun 2011 17:42:10 +0000</pubDate>
		<dc:creator>Roman</dc:creator>
				<category><![CDATA[Utilities]]></category>
		<category><![CDATA[adobe]]></category>
		<category><![CDATA[camera]]></category>
		<category><![CDATA[capture]]></category>
		<category><![CDATA[device]]></category>
		<category><![CDATA[DirectShow]]></category>
		<category><![CDATA[driver]]></category>
		<category><![CDATA[dshow]]></category>
		<category><![CDATA[ecnoder]]></category>
		<category><![CDATA[encoder]]></category>
		<category><![CDATA[filter]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[FMLE]]></category>
		<category><![CDATA[google talk]]></category>
		<category><![CDATA[ip]]></category>
		<category><![CDATA[JPEG]]></category>
		<category><![CDATA[M-JPEG]]></category>
		<category><![CDATA[skype]]></category>
		<category><![CDATA[Source]]></category>
		<category><![CDATA[Video]]></category>

		<guid isPermaLink="false">http://alax.info/blog/?p=1223</guid>
		<description><![CDATA[<a href="http://alax.info/blog/1223" title="IP Video Source: 64-bit version, resolution flexibility, Adobe FMLE"></a>The IP Video Source update provides several improvements to the driver: copy/paste feature to backup, restore, or synchronize installed devices between 32-bit and 64-bit versions 64-bit version and .MSI dynamic video resizing (via Video Resizer DSP) Adobe FMLE compatibility Updates &#8230;<p class="read-more"><a href="http://alax.info/blog/1223">Read more &#187;</a></p>]]></description>
			<content:encoded><![CDATA[<a href="http://alax.info/blog/1223" title="IP Video Source: 64-bit version, resolution flexibility, Adobe FMLE"></a><p>The <a href="http://alax.info/blog/1216">IP Video Source</a> update provides several improvements to the driver:</p>
<ul>
<li>copy/paste feature to backup, restore, or synchronize installed devices between 32-bit and 64-bit versions</li>
<li>64-bit version and .MSI</li>
<li>dynamic video resizing (via <a href="http://msdn.microsoft.com/en-us/library/ff819491%28VS.85%29.aspx">Video Resizer DSP</a>)</li>
<li>Adobe FMLE compatibility</li>
</ul>
<p>Updates in greater detail follow.</p>
<h4>Device Copy/Paste Feature</h4>
<p>The video device management window is providing Copy and Paste buttons, which let user transfer device information, including name and settings, through clipboard for various purposes:</p>
<ul>
<li>save data in order to be able to restore devices later</li>
<li>restore devices from saved list, or re-create from a list saved on another machine</li>
<li>duplicate a device</li>
<li>synchronize devices between 32-bit and 64-bit versions</li>
</ul>
<p>The device data is a text, one line per device, lines in comma-separated values (<a href="http://en.wikipedia.org/wiki/Comma-separated_values">CSV</a>) format.</p>
<p><img class="alignnone size-full wp-image-1224" title="Manage Video Devices" src="http://alax.info/blog/wp-content/uploads/2011/06/Image001.png" alt="" width="565" height="432" /></p>
<p><span id="more-1223"></span></p>
<h4>64-Bit Version</h4>
<p>Software is available in both 32-bit and 64-bit versions. While most of multimedia software is still 32-bit, sometimes 64-bit version is really helpful to, for example:</p>
<ul>
<li> interface to &#8220;Any CPU&#8221; .NET code which executes in 64-bit on a 64-bit operating system</li>
<li>go beyond 32-bit code boundaries, especially in part of multiple devices and virtual address space limit</li>
</ul>
<p>64-bit version duplicates functionality available in 32-bit version, though 32- and 64-bit modules run in completely separated environments.</p>
<p><img class="alignnone size-full wp-image-1225" title="Start Menu - Video Type-In" src="http://alax.info/blog/wp-content/uploads/2011/06/Image002.png" alt="" width="420" height="451" /></p>
<h4>Dynamic Video Resizing</h4>
<p>The source DirectShow filter is capable of connecting with media types different from original/camera media type in resolution part for decompressed video. The filter is internally taking advantage of <a href="http://msdn.microsoft.com/en-us/library/ff819491%28VS.85%29.aspx">Video Resizer DSP</a>, and resizes decompressed video to format of interest.</p>
<p>As Video Resizer DSP is available starting with Windows Vista, the functionality availability is subject to the same conditions.</p>
<p>The feature is absolutely required for Adobe Flash Media Live Encoder software, as it make certain assumptions as for supported resolutions, and completely ignores the information the filter makes available in standard way.</p>
<h4>Adobe Flash Media Live Encoder Friendliness</h4>
<p>The update make the device much closer to interoperation with Adobe product. The software works around a handful of bugs, including as ridiculous as neglecting to provide correct BI_RGB value in BITMAPINFOHEADER::biCompression structure, yet researchers are still to resolve the remained ones.</p>
<p>FMLE would start perfect and stream video being run under debugger, otherwise in a regular run chances are that Adobe application would internally respond with E_UNEXPECTED failure for unknown reason, stop any encoding without giving a single little notice on the GUI.</p>
<p>After all, the encoding runs perfectly through web based encoder, and the driver is providing a good way to stream to video distribution sites such as <a href="http://ustream.tv">http://ustream.tv</a>, <a href="http://livestream.com">http://livestream.com</a> from an IP camera or video encoder.</p>
<p><img class="alignnone size-large wp-image-1226" title="Adobe FMLE 3.2" src="http://alax.info/blog/wp-content/uploads/2011/06/Image003-800x600.png" alt="" width="620" height="465" /></p>
<h4>Download Information</h4>
<ul>
<li>Download (32-bit): <a href="../../blog-dist/AlaxInfoIpVideoSourceSetup.msi">AlaxInfoIpVideoSourceSetup.msi</a></li>
<li>Download (64-bit): <a href="http://alax.info/blog-dist/AlaxInfoIpVideoSourceSetup-x64.msi">AlaxInfoIpVideoSourceSetup-x64.msi</a></li>
<li>License: This software is free to use</li>
</ul>
<p>&nbsp;</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://alax.info/blog/1223/feed</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>DirectShow Video Source Filter for JPEG and M-JPEG IP Cameras</title>
		<link>http://alax.info/blog/1216</link>
		<comments>http://alax.info/blog/1216#comments</comments>
		<pubDate>Sun, 22 May 2011 22:07:03 +0000</pubDate>
		<dc:creator>Roman</dc:creator>
				<category><![CDATA[Utilities]]></category>
		<category><![CDATA[camera]]></category>
		<category><![CDATA[capture]]></category>
		<category><![CDATA[device]]></category>
		<category><![CDATA[DirectShow]]></category>
		<category><![CDATA[driver]]></category>
		<category><![CDATA[dshow]]></category>
		<category><![CDATA[ecnoder]]></category>
		<category><![CDATA[filter]]></category>
		<category><![CDATA[google talk]]></category>
		<category><![CDATA[ip]]></category>
		<category><![CDATA[JPEG]]></category>
		<category><![CDATA[M-JPEG]]></category>
		<category><![CDATA[skype]]></category>
		<category><![CDATA[Source]]></category>
		<category><![CDATA[Video]]></category>

		<guid isPermaLink="false">http://alax.info/blog/?p=1216</guid>
		<description><![CDATA[<a href="http://alax.info/blog/1216" title="DirectShow Video Source Filter for JPEG and M-JPEG IP Cameras"></a>This implements a DirectShow driver/wrapper over a HTTP based JPEG/M-JPEG streamed video, widely available with IP cameras. Once installed, it provides a Start Menu shortcut to manage video capture devices, where a user can add/remove devices. The devices are automatically &#8230;<p class="read-more"><a href="http://alax.info/blog/1216">Read more &#187;</a></p>]]></description>
			<content:encoded><![CDATA[<a href="http://alax.info/blog/1216" title="DirectShow Video Source Filter for JPEG and M-JPEG IP Cameras"></a><p>This implements a <a href="http://msdn.microsoft.com/en-us/library/dd375454%28VS.85%29.aspx">DirectShow</a> driver/wrapper over a HTTP based JPEG/<a href="http://en.wikipedia.org/wiki/Motion_JPEG#IP_Cameras">M-JPEG</a> streamed video, widely available with IP cameras. Once installed, it provides a Start Menu shortcut to manage video capture devices, where a user can add/remove devices. The devices are automatically registered with DriectShow and are available to applications.</p>
<p><img class="alignnone size-full wp-image-1217" title="Start Menu Shortcut" src="http://alax.info/blog/wp-content/uploads/2011/05/Image0011.png" alt="" width="451" height="482" /> <img class="alignnone size-full wp-image-1218" title="Manage Video Devices" src="http://alax.info/blog/wp-content/uploads/2011/05/Image0021.png" alt="" width="377" height="432" /></p>
<p>The compatibility list includes:</p>
<ul>
<li>Windows SDK <a href="http://msdn.microsoft.com/en-us/library/dd373424%28VS.85%29.aspx">AmCap</a> Sample (reference)</li>
<li><a href="http://msdn.microsoft.com/en-us/library/dd390950%28VS.85%29.aspx">VideoLan VLC</a></li>
<li><a href="http://www.skype.com/">Skype</a> (see below)</li>
<li><a href="http://www.google.com/talk/">Google Talk Video Chat</a></li>
<li><a href="http://luxriot.com">Luxriot</a> (as rather an example as Luxriot has its own generic JPEG/M-JPEG device driver, however this still demonstrates compatibility and interoperability of applications)</li>
<li><a href="http://msdn.microsoft.com/en-us/library/dd390950%28VS.85%29.aspx">GraphEdit</a>, GraphStudio and similar tools</li>
</ul>
<p><span id="more-1216"></span></p>
<p>For a created device it is required to configure:</p>
<ol>
<li>JPEG or M-JPEG resource URL on the device, where the driver will access video feed or sequential snapshots</li>
<li>Image/video size on the device</li>
</ol>
<p><img class="alignnone size-full wp-image-1219" title="Device Property Sheet - General Property Page" src="http://alax.info/blog/wp-content/uploads/2011/05/Image0032.png" alt="" width="377" height="432" /></p>
<p>Resource URLs vary from device to device and there is no standard identifier. This has to be looked up for specific model in device API reference or SDK. For JPEG snapshots it is possible to copy image shortcut from web browser and paste address into device settings.</p>
<p>Note that some devices, especially low end IP cameras deliver non-compliant feed which can be decoded either by manufacturer&#8217;s ActiveX control or model-specific implementation which this driver does not convert and is unlikely to ever cover. The driver will only work with hardware which honors industry standards.</p>
<p>For example, <a href="http://www.stardot.com/products/cameras">Stardot NetCam SC</a> cameras make the video feed accessible using /nph-mjpeg.cgi resource, so the full URL will consist of protocol prefix &#8220;http://&#8221;, optional username and password (see screenshot above), IP address or host name e.g. &#8220;demo2.stardotcams.com&#8221;, resource identifier on the device &#8220;/nph-mjpeg.cgi&#8221;.</p>
<p>Hence, http://demo2.stardotcams.com/nph-mjpeg.cgi</p>
<p>It is necessary to provide video size of the footage in advance so that the driver could negotiate content media types without accessing the device. Future versions of the driver might implement auto-detection.</p>
<h4>Skype Compatibility</h4>
<p>To make the device work with Skype, it is necessary to:</p>
<ol>
<li>Configure the device (using its web interface) to work at resolution 640&#215;480</li>
<li>Add/configure device with Alax.Info IP video Source as described above, including setting of 640 by 480 pixel resolution in device configuration</li>
</ol>
<p><img class="alignnone size-full wp-image-1220" title="Skype Video Device" src="http://alax.info/blog/wp-content/uploads/2011/05/Image0042.png" alt="" width="716" height="612" /></p>
<h4>Internals</h4>
<p>Software implements and registers video input/capture devices, listed under <a href="http://msdn.microsoft.com/en-us/library/ms783347%28VS.85%29.aspx">DirectShow CLSID_VideoInputDeviceCategory</a> category. The applications access devices from the list and treat as a regular device such as web camera.</p>
<p><a href="http://msdn.microsoft.com/en-us/library/dd373424%28VS.85%29.aspx">Windows SDK AmCap sample</a> will create the following DirectShow graph where the source filter implemented by this software:</p>
<p><img class="alignnone size-full wp-image-1221" title="Outer DirectShow Fitler Graph" src="http://alax.info/blog/wp-content/uploads/2011/05/Image006.png" alt="" width="615" height="295" /></p>
<p>Internally, software creates a worker filter graph in order to stream data from the device:</p>
<p><a href="http://alax.info/blog/wp-content/uploads/2011/05/Image0051.png"><img class="alignnone size-large wp-image-1222" title="Inner DirectShow Fitler Graph" src="http://alax.info/blog/wp-content/uploads/2011/05/Image0051-800x294.png" alt="" width="620" height="227" /></a></p>
<p>To decode video, software uses stock <a href="http://msdn.microsoft.com/en-us/library/dd390691%28VS.85%29.aspx">MJPEG Decompressor Filter</a> provided with operating system.</p>
<h4>Download Information</h4>
<ul>
<li>Download (32-bit): <a href="http://alax.info/blog-dist/AlaxInfoIpVideoSourceSetup.msi">AlaxInfoIpVideoSourceSetup.msi</a></li>
<li>Download (64-bit): To Be Done/On Request</li>
<li>License: This software is free to use</li>
</ul>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://alax.info/blog/1216/feed</wfw:commentRss>
		<slash:comments>1</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[<a href="http://alax.info/blog/1006" title="MediaTools: How to manually configure filters to render M-JPEG video stream from an IP camera"></a>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 &#8230;<p class="read-more"><a href="http://alax.info/blog/1006">Read more &#187;</a></p>]]></description>
			<content:encoded><![CDATA[<a href="http://alax.info/blog/1006" title="MediaTools: How to manually configure filters to render M-JPEG video stream from an IP camera"></a><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>MediaTools: HTTP Stream File Renderer Filter and more</title>
		<link>http://alax.info/blog/817</link>
		<comments>http://alax.info/blog/817#comments</comments>
		<pubDate>Sat, 14 Feb 2009 18:08:53 +0000</pubDate>
		<dc:creator>Roman</dc:creator>
				<category><![CDATA[ATL]]></category>
		<category><![CDATA[Media Tools]]></category>
		<category><![CDATA[Source]]></category>
		<category><![CDATA[Video]]></category>
		<category><![CDATA[WTL]]></category>
		<category><![CDATA[C++]]></category>
		<category><![CDATA[camera]]></category>
		<category><![CDATA[DirectShow]]></category>
		<category><![CDATA[HTTP]]></category>
		<category><![CDATA[JPEG]]></category>
		<category><![CDATA[M-JPEG]]></category>

		<guid isPermaLink="false">http://alax.info/blog/?p=817</guid>
		<description><![CDATA[<a href="http://alax.info/blog/817" title="MediaTools: HTTP Stream File Renderer Filter and more"></a>In order to better troubleshoot network cameras and other devices, I added a new DirectShow filter to write HTTP response headers and body into a single file, one file (actually a pairs of files, the second file contains UTF-8 formatted &#8230;<p class="read-more"><a href="http://alax.info/blog/817">Read more &#187;</a></p>]]></description>
			<content:encoded><![CDATA[<a href="http://alax.info/blog/817" title="MediaTools: HTTP Stream File Renderer Filter and more"></a><p>In order to better troubleshoot network cameras and other devices, I added a new DirectShow filter to write HTTP response headers and body into a single file, one file (actually a pairs of files, the second file contains UTF-8 formatted HTTP response headers) per HTTP response.</p>
<p>While troubleshootting <a href="http://ijg.org">JPEG</a> artefact issue with I used the following graph:</p>
<p><a href="http://alax.info/blog/wp-content/uploads/2009/02/14-image001.png"><img class="alignnone size-medium wp-image-818" title="HTTP Stream File Renderer Filter in Filter Graph" src="http://alax.info/blog/wp-content/uploads/2009/02/14-image001-300x188.png" alt="HTTP Stream File Renderer Filter in Filter Graph" width="300" height="188" /></a></p>
<p>which started <a href="http://en.wikipedia.org/wiki/Motion_JPEG#M-JPEG_over_HTTP">M-JPEG</a> streaming from a camera and had entire stream written into <em>Response-01586228-0001-0001-Headers.txt</em> (Headers) and <em>Response-01586228-0001-0001.dat</em> (Data) files, while parsed JPEG frames were also written into individual files and were available for comparison.</p>
<p>Other changes include:</p>
<ul>
<li>new HTTP Stream File Renderer Filter (details are below)</li>
<li>attachable media types on internally used memory allocators, which enable filters to effectively reagree media types in running state</li>
<li>workaround for <a href="http://panasonic.co.jp/pcc/products/en/netwkcam/lineup/bl-c140/index.html">Panasonic BL-C140</a> camera (may be also helpful for other models), details <a href="http://alax.info/blog/741/comment-page-1#comment-5669">here</a></li>
</ul>
<p>There also seems to be a bug in <a href="http://www.intel.com/cd/software/products/asmo-na/eng/302910.htm">Intel IPP 6.0</a> JPEG decoder that leaves bottom right image block incorrectly decoded, only when a sequence of images is decoded and the frame is not the first in the sequence.</p>
<p>A partial Visual C++ .NET 2008 source code is <a href="http://code.assembla.com/roatl-utilities/subversion/nodes/trunk/Extended7zShell">available from SVN</a>, release binary <a href="http://code.assembla.com/roatl-utilities/subversion/nodes/trunk/MediaTools/_Bin/Release Trace/Acquisition.dll?format=raw">included</a>.</p>
<p><span id="more-817"></span></p>
<h2>File and Class Summary</h2>
<h3>Acqusition.dll</h3>
<p>Acqusition.dll (<a href="http://code.assembla.com/roatl-utilities/subversion/nodes/trunk/MediaTools/_Bin/Release Trace/Acquisition.dll?format=raw">download</a>) hosts the following classes:</p>
<ul>
<li>DirectShow Filters
<ul>
<li><span style="text-decoration: underline;">HTTP Stream File Renderer Filter</span>, to write raw HTTP response headers and data into files</li>
</ul>
</li>
</ul>
<h2>Class Overview</h2>
<h3>HTTP Stream File Renderer Filter</h3>
<p>The filter renders input stream of one or more HTTP responses and write HTTP response headers and data into files, per HTTP response, into provided directory.</p>
<ul>
<li>Filter Executable: Acquisition.dll</li>
<li>Filter CLSID: __uuidof(HttpStreamFileRendererFilter) {B02FDAEF-E851-4380-82D6-04772E33675D}</li>
<li>Filter Property Page CLSID: __uuidof(HttpStreamFileRendererFilterDirectoryPropertyPage), {FAF31D20-842A-46b4-B6F8-E410FB0188A5}</li>
<li>Filter Merit: <a href="http://msdn.microsoft.com/en-us/library/ms787275(VS.85).aspx">MERIT_DO_NOT_USE</a></li>
<li>Filter Category: <a href="http://msdn.microsoft.com/en-us/library/ms783347(VS.85).aspx">CLSID_LegacyAmFilterCategory</a></li>
<li>Filter Interfaces: <a href="http://msdn.microsoft.com/en-us/library/ms682273(VS.85).aspx">IPersistStreamInit</a>, <a href="http://msdn.microsoft.com/en-us/library/ms690091(VS.85).aspx">IPersistStream</a>, <a href="http://msdn.microsoft.com/en-us/library/ms695217(VS.85).aspx">ISpecifyPropertyPages</a>, <a href="http://msdn.microsoft.com/en-us/library/ms784601(VS.85).aspx">IBaseFilter</a>, <a href="http://msdn.microsoft.com/en-us/library/ms785914(VS.85).aspx">IMediaFilter</a>, <a href="http://msdn.microsoft.com/en-us/library/ms688695(VS.85).aspx">IPersist</a>, <a href="http://msdn.microsoft.com/en-us/library/ms683857.aspx"></a><a href="http://msdn.microsoft.com/en-us/library/ms784083(VS.85).aspx">IAMovieSetup</a>, <a href="http://msdn.microsoft.com/en-us/library/ms783950(VS.85).aspx">IAMFilterMiscFlags</a>, IHttpStreamFileRendererFilter, <a href="http://msdn.microsoft.com/en-us/library/ms221608.aspx">IDispatch</a>, <a href="http://msdn.microsoft.com/en-us/library/ms785712.aspx">IFileSinkFilter2</a> (not available in graphedt.exe process), <a href="http://msdn.microsoft.com/en-us/library/ms785715(VS.85).aspx">IFileSinkFilter</a> (not available in graphedt.exe process)</li>
<li>Filter Pins: single input pin (Input)</li>
<li>Input Pin Media Types: MEDIATYPE_Stream/MEDIASUBTYPE_NULL</li>
<li>Input Pin Interfaces: <a href="http://msdn.microsoft.com/en-us/library/ms786565(VS.85).aspx">IPin</a>, <a href="http://msdn.microsoft.com/en-us/library/ms786054(VS.85).aspx">IMemInputPin</a></li>
</ul>
<h4>Remarks</h4>
<p>None.</p>
]]></content:encoded>
			<wfw:commentRss>http://alax.info/blog/817/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>JPEG Multi File Video Capture Source Filter, a virtual DirectShow camera</title>
		<link>http://alax.info/blog/762</link>
		<comments>http://alax.info/blog/762#comments</comments>
		<pubDate>Sat, 17 Jan 2009 11:20:33 +0000</pubDate>
		<dc:creator>Roman</dc:creator>
				<category><![CDATA[ATL]]></category>
		<category><![CDATA[Source]]></category>
		<category><![CDATA[Video]]></category>
		<category><![CDATA[C++]]></category>
		<category><![CDATA[camera]]></category>
		<category><![CDATA[capture]]></category>
		<category><![CDATA[DirectShow]]></category>
		<category><![CDATA[JPEG]]></category>

		<guid isPermaLink="false">http://alax.info/blog/?p=762</guid>
		<description><![CDATA[<a href="http://alax.info/blog/762" title="JPEG Multi File Video Capture Source Filter, a virtual DirectShow camera"></a>Provided that there already is a JPEG Multi File Source Filter that can act as a video source streaming video from local JPEG files, it looked to be useful to build a virtual camera on top of this filter. This &#8230;<p class="read-more"><a href="http://alax.info/blog/762">Read more &#187;</a></p>]]></description>
			<content:encoded><![CDATA[<a href="http://alax.info/blog/762" title="JPEG Multi File Video Capture Source Filter, a virtual DirectShow camera"></a><p>Provided that there already is a <a href="http://alax.info/blog/741">JPEG Multi File Source Filter</a> that can act as a video source streaming video from local JPEG files, it looked to be useful to build a virtual camera on top of this filter. This is the main difference: an existing filter is generic and customizable: it requires to be provided a directory with the files, other settings may also apply. A virtual camera is the filter that has to work out of the box: a video enabled application, such as <a href="http://msdn.microsoft.com/en-us/library/ms778964.aspx">AMCap Sample</a>, <a href="http://sourceforge.net/projects/guliverkli/">Media Player Classic</a>, <a href="http://videolan.org">VideoLAN</a>, <a href="http://skype.com">Skype</a>, <a href="http://www.microsoft.com/windows/windowsmedia/9series/encoder/default.aspx">Windows Media Encoder</a> enumerates video capture sources, instantiate the one of the interest and it should already be ready to stream.</p>
<h3>Implementation Details</h3>
<p>The very first question is embedding of an existing filter into new filter. The two most common methods are:</p>
<ul>
<li><a href="https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=262853&amp;wa=wsignin1.0">COM aggregation</a></li>
<li>embedding a fully featured graph with a sink/renderer that intercepts media samples downstream and forwards to a higher level filter so that it streams them as a source filter</li>
</ul>
<p>The COM aggregation methods is much easier in implementation but it is subject to a few constraints, the two most important of which are:</p>
<ul>
<li>embedded filter should support instantiation as an aggregated object</li>
<li>it is the only underlying filter, not a chain of filters, which can produce required data</li>
</ul>
<p>COM aggregation is quite fitting for the purpose, so the second embedding method is being left for another topic (with a certain luck to be appear very soon, a DirectShow video capture source filter for a real network/IP camera).</p>
<p>The next step is a check of sufficient implementation in an underlying filter. Obviously, a video source that pretends to be a live video capture source needs an endless stream of media samples, while original implementation streams JPEG files as media samples once only, we need an option to loop the streaming and automatically repeat the sequence.</p>
<p>Playback looping is added to the original <a href="http://alax.info/blog/741">JPEG Multi File Source Filter</a> and its controlling private interface IJpegMultiFileSourceFilter received additional properties:</p>
<pre style="background: #ffffff none repeat scroll 0% 0%; color: #000000;"><span style="color: #800000; font-weight: bold;">interface</span> IJpegMultiFileSourceFilter <span style="color: #800080;">:</span> IDispatch
<span style="color: #800080;">{</span>
<span style="color: #808030;">.</span><span style="color: #808030;">.</span><span style="color: #808030;">.</span>
    <span style="color: #808030;">[</span><span style="color: #800000; font-weight: bold;">propget</span><span style="color: #808030;">,</span> <span style="color: #800000; font-weight: bold;">id</span><span style="color: #808030;">(</span><span style="color: #008c00;">2</span><span style="color: #808030;">)</span><span style="color: #808030;">]</span> HRESULT AutoRepeat<span style="color: #808030;">(</span><span style="color: #808030;">[</span>out<span style="color: #808030;">,</span> retval<span style="color: #808030;">]</span> VARIANT_BOOL<span style="color: #808030;">*</span> pbAutoRepeat<span style="color: #808030;">)</span><span style="color: #800080;">;</span>
    <span style="color: #808030;">[</span><span style="color: #800000; font-weight: bold;">propput</span><span style="color: #808030;">,</span> <span style="color: #800000; font-weight: bold;">id</span><span style="color: #808030;">(</span><span style="color: #008c00;">2</span><span style="color: #808030;">)</span><span style="color: #808030;">]</span> HRESULT AutoRepeat<span style="color: #808030;">(</span><span style="color: #808030;">[</span>in<span style="color: #808030;">]</span> VARIANT_BOOL bAutoRepeat<span style="color: #808030;">)</span><span style="color: #800080;">;</span>
    <span style="color: #808030;">[</span><span style="color: #800000; font-weight: bold;">propget</span><span style="color: #808030;">,</span> <span style="color: #800000; font-weight: bold;">id</span><span style="color: #808030;">(</span><span style="color: #008c00;">3</span><span style="color: #808030;">)</span><span style="color: #808030;">]</span> HRESULT RepeatDelay<span style="color: #808030;">(</span><span style="color: #808030;">[</span>out<span style="color: #808030;">,</span> retval<span style="color: #808030;">]</span> <span style="color: #603000;">LONG</span><span style="color: #808030;">*</span> pnRepeatDelay<span style="color: #808030;">)</span><span style="color: #800080;">;</span>
    <span style="color: #808030;">[</span><span style="color: #800000; font-weight: bold;">propput</span><span style="color: #808030;">,</span> <span style="color: #800000; font-weight: bold;">id</span><span style="color: #808030;">(</span><span style="color: #008c00;">3</span><span style="color: #808030;">)</span><span style="color: #808030;">]</span> HRESULT RepeatDelay<span style="color: #808030;">(</span><span style="color: #808030;">[</span>in<span style="color: #808030;">]</span> <span style="color: #603000;">LONG</span> nRepeatDelay<span style="color: #808030;">)</span></pre>
<p>as well the new property page:</p>
<p><a href="http://alax.info/blog/wp-content/uploads/2009/01/17-image001.png"><img class="alignnone size-medium wp-image-766" title="JPEG Multi File Source Filter Playback Property Page" src="http://alax.info/blog/wp-content/uploads/2009/01/17-image001-259x300.png" alt="" width="259" height="300" /></a></p>
<p><span id="more-762"></span></p>
<p>As soon as the underlying implementation is ready, it is the right time to get down to the immediate filter COM class. It will be require to implement certain interfaces, to expose certain interfaces of the aggregated object and possibly to hide certain interfaces of the aggregated object. However, the first thing to do is to instantiate aggregated object, for which the right place is ATLs&#8217; FinalConstruct:</p>
<pre><span style="color: #800000; font-weight: bold;">class</span> ATL_NO_VTABLE CFilter <span style="color: #800080;">:</span>
<span style="color: #808030;">.</span><span style="color: #808030;">.</span><span style="color: #808030;">.</span>
<span style="color: #800080;">{</span>
<span style="color: #808030;">.</span><span style="color: #808030;">.</span><span style="color: #808030;">.</span>
DECLARE_PROTECT_FINAL_CONSTRUCT<span style="color: #808030;">(</span><span style="color: #808030;">)</span>

DECLARE_GET_CONTROLLING_UNKNOWN<span style="color: #808030;">(</span><span style="color: #808030;">)</span>
<span style="color: #808030;">.</span><span style="color: #808030;">.</span><span style="color: #808030;">.</span>
    CComPtr<span style="color: #800080;">&lt;</span>IUnknown<span style="color: #800080;">&gt;</span> m_pInnerUnknown<span style="color: #800080;">;</span>
    CComPtr<span style="color: #800080;">&lt;</span>IBaseFilter<span style="color: #800080;">&gt;</span> m_pInnerBaseFilter<span style="color: #800080;">;</span>
    CComPtr<span style="color: #800080;">&lt;</span>IPersistStream<span style="color: #800080;">&gt;</span> m_pInnerPersistStream<span style="color: #800080;">;</span>
<span style="color: #808030;">.</span><span style="color: #808030;">.</span><span style="color: #808030;">.</span>
    HRESULT FinalContruct<span style="color: #808030;">(</span><span style="color: #808030;">)</span>
    <span style="color: #800080;">{</span>
<span style="color: #808030;">.</span><span style="color: #808030;">.</span><span style="color: #808030;">.</span>
        __C<span style="color: #808030;">(</span>m_pInnerUnknown<span style="color: #808030;">.</span>CoCreateInstance<span style="color: #808030;">(</span><span style="color: #800000; font-weight: bold;">__uuidof</span><span style="color: #808030;">(</span>JpegMultiFileSourceFilter<span style="color: #808030;">)</span><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><span style="color: #800080;">;</span>
        CComQIPtr<span style="color: #800080;">&lt;</span>IJpegMultiFileSourceFilter<span style="color: #800080;">&gt;</span> pJpegMultiFileSourceFilter <span style="color: #808030;">=</span> m_pInnerUnknown<span style="color: #800080;">;</span>
        __D<span style="color: #808030;">(</span>pJpegMultiFileSourceFilter<span style="color: #808030;">,</span> E_NOINTERFACE<span style="color: #808030;">)</span><span style="color: #800080;">;</span>
<span style="color: #808030;">.</span><span style="color: #808030;">.</span><span style="color: #808030;">.</span>
        __C<span style="color: #808030;">(</span>pJpegMultiFileSourceFilter<span style="color: #808030;">-</span><span style="color: #808030;">&gt;</span>put_Directory<span style="color: #808030;">(</span>CComBSTR<span style="color: #808030;">(</span>sDirectory<span style="color: #808030;">)</span><span style="color: #808030;">)</span><span style="color: #808030;">)</span><span style="color: #800080;">;</span>
        __C<span style="color: #808030;">(</span>pJpegMultiFileSourceFilter<span style="color: #808030;">-</span><span style="color: #808030;">&gt;</span>put_AutoRepeat<span style="color: #808030;">(</span>ATL_VARIANT_TRUE<span style="color: #808030;">)</span><span style="color: #808030;">)</span><span style="color: #800080;">;</span>
        __C<span style="color: #808030;">(</span>pJpegMultiFileSourceFilter<span style="color: #808030;">-</span><span style="color: #808030;">&gt;</span>put_RepeatDelay<span style="color: #808030;">(</span>nRepeatDelay<span style="color: #808030;">)</span><span style="color: #808030;">)</span><span style="color: #800080;">;</span>
<span style="color: #808030;">.</span><span style="color: #808030;">.</span><span style="color: #808030;">.</span>
        m_pInnerBaseFilter <span style="color: #808030;">=</span> CComQIPtr<span style="color: #800080;">&lt;</span>IBaseFilter<span style="color: #800080;">&gt;</span><span style="color: #808030;">(</span>m_pInnerUnknown<span style="color: #808030;">)</span><span style="color: #800080;">;</span>
        m_pInnerPersistStream <span style="color: #808030;">=</span> CComQIPtr<span style="color: #800080;">&lt;</span>IPersistStream<span style="color: #800080;">&gt;</span><span style="color: #808030;">(</span>m_pInnerUnknown<span style="color: #808030;">)</span><span style="color: #800080;">;</span>
        __D<span style="color: #808030;">(</span>m_pInnerBaseFilter<span style="color: #808030;">,</span> E_NOINTERFACE<span style="color: #808030;">)</span><span style="color: #800080;">;</span></pre>
<p>The aggregated (inner) object is created and its &#8220;main&#8221; IUnknown pointer is saved as lifetime reference (because for the COM aggregated object this is the only interface pointer which AddRef/Release has effect on internal reference counter &#8211; see <a href="http://msdn.microsoft.com/en-us/library/ms809989.aspx">COM Aggregation</a> details). The object is pre-initialzed immediately after creation and the effective values will be taken from registry key &#8220;SOFTWARE\Alax.Info\Media Tools\JPEG MultiFile Video Capture Filter&#8221; (see below). It also makes sense to pre-query most used object&#8217;s interfaces to be able to use them directly without querying for them each time they are required.</p>
<p>Once the inner object is here, we need to sort out the list of interfaces to support. Video capture source filters have specific requirements (see <a href="http://msdn.microsoft.com/en-us/library/dd391011(VS.85).aspx">Writing Capture Filters</a>), including indication of pin category and implementation of <a href="http://msdn.microsoft.com/en-us/library/ms785843(VS.85).aspx">IKsPropertySet</a> interface; optional availability of preview pin, which we can omit from implementation and let <a href="http://msdn.microsoft.com/en-us/library/ms783670(VS.85).aspx">Filter Graph Manager</a> use <a href="http://msdn.microsoft.com/en-us/library/ms787667.aspx">Smart Tee Pin Filter</a> to split stream into preview and capture.</p>
<p>Additionally, various software is expecting <a href="http://msdn.microsoft.com/en-us/library/ms784115(VS.85).aspx">IAMStreamConfig</a> interface on the output pin and would just fail to use the video capture device in case of its absence. We don&#8217;t have this interface implemented on the underlying filter, so we have to implement this on the wrapper. Since we need additional interfaces on the pin and the pin is an owned object of an inner aggregated object, it adds complexity to wrap original pin with a private pin class. An easy implementation of the latter point is not quite safe with COM aggregation, however a well written software that treats <a href="http://msdn.microsoft.com/en-us/library/ms786565(VS.85).aspx">IPin</a> interface as the &#8220;primary&#8221; pin&#8217;s interface and queries additional from it and holds the reference while using other interfaces will do just fine with a simple implementation on our side.</p>
<p>Another problem with the underlying filter which actually came up later but worth mentioning from the start. A <a href="http://alax.info/blog/741">JPEG Multi File Source Filter</a> streams video media sample with an empty format structure attached to <a href="http://msdn.microsoft.com/en-us/library/ms779120(VS.85).aspx">AM_MEDIA_TYPE</a> media type. This assumes that an instance of <a href="http://alax.info/blog/741">JPEG Frame Decoder Filter</a> will be added downstream and supply missing format by decoding JPEG data. While the filter is flexible enough to dynamically change media type along with JPEG data changes, this is not compatible with (not implemented by) most of the software. <a href="http://alax.info/blog/741">JPEG Frame Decoder Filter</a> makes a first guess by settings resolution to 320&#215;240. We need to set the right resolution immediately to avoid media type re-agreement.</p>
<p>To be able to do so we need to pass resolution information from original (inner) filter to the <a href="http://alax.info/blog/741">JPEG Frame Decoder Filter</a> instance. It is also important that the filters might have other filters connected in between and in most cases there will be at least <a href="http://msdn.microsoft.com/en-us/library/ms787667.aspx">Smart Tee Pin Filter</a>. To let the filters effectively communicate between each other and including in a reliable and documented way, available also to other/future filters, <a href="http://alax.info/blog/741">JPEG Frame Decoder Filter</a> inroduces a new interface IJpegFrameDecoderFilterSource which, on its input pin connection, it looks for among the upstream filters. Iteratively walking through upstream connections up to developed video capture source filter it reaches our implementation and is capable of changing the default resolution to the effective resolution and exposed correct media type on its output pin right from the start.</p>
<p>So the interfaces on the filter:</p>
<ul>
<li>implemented on the filter:
<ul>
<li><a href="http://msdn.microsoft.com/en-us/library/ms784601(VS.85).aspx">IBaseFilter</a> with IMediaFilter and IPersist to provide our own pin enumeration and supply a wrapper class for a pin object</li>
<li><a href="http://msdn.microsoft.com/en-us/library/ms682273(VS.85).aspx">IPersistStreamInit</a> and IPersistStream to be friendly with persistence-enabled applications</li>
<li><a href="http://msdn.microsoft.com/en-us/library/ms784083(VS.85).aspx">IAMovieSetup</a> to be able to be registered with DirectShow the way it is normally done</li>
<li>IFilter without <a href="http://msdn.microsoft.com/en-us/library/ms221608.aspx">IDispatch</a> is the filters private interface with IDispatch not exposed directly to let the underlying filter expose his</li>
<li>IJpegFrameDecoderFilterSource to communicate to downstream <a href="http://alax.info/blog/741">JPEG Frame Decoder Filter</a> and provide resolution information</li>
</ul>
</li>
<li>hidden implementation on the inner filter (other interfaces implemented by inner filter and not mentioned will be also available &#8220;outside&#8221;):
<ul>
<li><a href="http://msdn.microsoft.com/en-us/library/ms695217(VS.85).aspx">ISpecifyPropertyPages</a> to hide inner property pages since the inner object is initialized internally</li>
</ul>
</li>
<li>implemented on the pin:
<ul>
<li><a href="http://msdn.microsoft.com/en-us/library/ms786565(VS.85).aspx">IPin</a> to intercept method calls to possibly override media type enumeration and pin connection condition; while implementation of its methods (appeared to be not necessary, we still have to expose our private implementation of this interface since software will in most cases query additional interfaces from this interface pointer</li>
<li><a href="http://msdn.microsoft.com/en-us/library/ms785843(VS.85).aspx">IKsPropertySet</a> per MSDN requirement</li>
<li><a href="http://msdn.microsoft.com/en-us/library/ms784115(VS.85).aspx">IAMStreamConfig</a> to be compatible with wider range of software, specifically AMCap</li>
</ul>
</li>
</ul>
<p>Implementation details is available in reference implementation <a href="http://code.assembla.com/roatl-utilities/subversion/nodes/trunk/MediaTools/Samples/JpegMultiFileVideoCaptureSource/Filter.h">Filter.h in SVN</a>.</p>
<p>An updated version of the dependent binaries Acquisition.dll and CodingI.dll is <a href="http://code.assembla.com/roatl-utilities/subversion/nodes/trunk/MediaTools/_Bin/Release%20Trace">available from SVN</a>.</p>
<p>A few points to mention explicitly:</p>
<ul>
<li><a href="http://msdn.microsoft.com/en-us/library/ms785842(VS.85).aspx">IKsPropertySet::Get</a> marks the pin as a capture pin (PIN_CATEGORY_CAPTURE)</li>
<li><a href="http://msdn.microsoft.com/en-us/library/ms784115(VS.85).aspx">IAMStreamConfig</a> minimal implementation ignores media type in <a href="http://msdn.microsoft.com/en-us/library/ms784116(VS.85).aspx">SetFormat</a>; returns the only available media type in <a href="http://msdn.microsoft.com/en-us/library/ms784112(VS.85).aspx">GetFormat</a> using 300 fps frame rate value in order for it to be not zero and not very low to avoid collision of frames; returns one video capability in <a href="http://msdn.microsoft.com/en-us/library/ms784113(VS.85).aspx">GetNumberOfCapabilities</a> and <a href="http://msdn.microsoft.com/en-us/library/ms784114(VS.85).aspx">GetStreamCaps</a> &#8211; this should be sufficient provided that we actually don&#8217;t accept any cahnges/configuration on this interface</li>
<li><a href="http://msdn.microsoft.com/en-us/library/ms784599(VS.85).aspx">IBaseFilter::EnumPins</a> exposes a private wrapper pin class over original pin, so that we are capable of providing additional interfaces off the exposed output pin; we should have also provided an equal replacement through <a href="http://msdn.microsoft.com/en-us/library/ms784600(VS.85).aspx">IBaseFilter::FindPin</a> but this method is actually very rarely used and appears to be safe to omit, probably unless a compatibility issue arises later</li>
<li>IJpegFrameDecoderFilterSource::GetDefaultExtent is the way <a href="http://alax.info/blog/741">JPEG Frame Decoder Filter</a> obtains original video resolution.</li>
</ul>
<p>On initialization the filter will query registry key &#8220;SOFTWARE\Alax.Info\Media Tools\JPEG MultiFile Video Capture Filter&#8221; for initialization values. Both HKEY_LOCAL_MACHINE and HKEY_CURRENT_USER might be used, HKEY_CURRENT_USER has the priority if present, unless HKEY_LOCAL_MACHINE has an additional non-zero REG_DWORD value named &#8220;Force&#8221;, in which case it takes priority over HKEY_CURRENT_USER. Initialization values are:</p>
<ul>
<li>&#8220;Directory&#8221; REG_SZ is the directory containing JPEG files to stream from</li>
<li>&#8220;Repeat Delay&#8221; REG_DWORD is the pause in milliseconds between last and first frame when looping when playback</li>
<li>&#8220;Video Width&#8221; and &#8220;Video Height&#8221; REG_DWORD is original video resolution and should match those of JPEG files</li>
</ul>
<p>Another necessary implementation stroke is related to time stamps. The original inner <a href="http://alax.info/blog/741">JPEG Multi File Source Filter</a> did not do any frame rate control at which the media samples are sent downstream. It was assumed that [video] renderer filter will enforce media sample presentation time and add necessary delay while playing video frames back. However, this approach does not work in a capture filter: when previewing video, a <a href="http://msdn.microsoft.com/en-us/library/ms787667.aspx">Smart Tee Pin Filter</a>, which is inserted to make preview samples out of capture samples, is stripping time stamps and video renderer renders media samples at full possible rate. To address this issue, the <a href="http://alax.info/blog/741">JPEG Multi File Source Filter</a> is received a new property Rate, which defaults to zero and implements uncontrolled sending of data downstream. With a Rate property value of 1.0, the filter does rate control and adds necessary delay as if the media samples are captured in real time.</p>
<h3>Compatibility</h3>
<p><a href="http://msdn.microsoft.com/en-us/library/ms787460(VS.85).aspx">Graph Edit</a> and <a href="http://www.monogram.sk/">Graph Studio</a> list, insert and are otherwise compatible with the new filter. They don&#8217;t have any assumptions on the filter implementation except the very basic, so they are quite capable of manipulating the new filter.</p>
<p><a href="http://msdn.microsoft.com/en-us/library/ms778964.aspx">AMCap Sample</a> recognizes the capture source and is rendering the filter through Capture Graph Builder, which automatically inserts <a href="http://msdn.microsoft.com/en-us/library/ms787667.aspx">Smart Tee Pin Filter</a>. The application is properly showing the video from the new filter.</p>
<p><a href="http://sourceforge.net/projects/guliverkli/">Media Player Classic</a>&#8216;s &#8220;Open Device&#8230;&#8221; menu command is capable of connecting to the new filter and the application is showing video.</p>
<p><a href="http://videolan.org">VideoLAN</a> [unexpectedly] failed to receive video from the new filter. It appears that the application is enumerating supported media types and is only capable of accepting those handled directly by the application. JPEG video with FOURCC code &#8216;AIJ0&#8242; is not on that list and the application does not make any attempt, that a proper application would do, to render the filter through intermediate codecs using <a href="http://msdn.microsoft.com/en-us/library/ms786503(VS.85).aspx">Intelligent Connect</a>. The application won&#8217;t be able to receive video from the filter before the latter implements decoding into a well known pixel format, such as for example <a href="http://fourcc.org/rgb.php#BI_RGB">RGB</a> or <a href="http://fourcc.org/yuv.php#YUY2">YUY2</a>.</p>
<p><a href="http://skype.com">Skype</a> beta 4.0.0.176 failed to receive video from the filter, though the filter is seen by the software as a video source. The logs don&#8217;t indicate the reason and it seems that the application does not like video capabilities and stops trying to get video from the device.</p>
<h3>Summary</h3>
<ul>
<li>Virtual DirectShow camera implemented</li>
<li>Supported by Graph Edit, Monogram Graph Studio (one has to re-enter file directory from GUI when adding a filter), AMCap, Media Player Classic</li>
<li>Does not integrate into VideoLAN because of its [unexpectedly] limited capabilities</li>
<li>Does not integrate into Skype for whatever reason, probably just another of a number of bugs in a beta version</li>
</ul>
<p>A partial reference Visual C++ .NET 2008 source code is <a href="http://code.assembla.com/roatl-utilities/subversion/nodes/trunk/MediaTools/Samples/JpegMultiFileVideoCaptureSource">available from SVN</a>, release binary <a href="http://code.assembla.com/roatl-utilities/subversion/nodes/trunk/MediaTools/Samples/JpegMultiFileVideoCaptureSource/Release/JpegMultiFileVideoCaptureSource.dll?format=raw">included</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://alax.info/blog/762/feed</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>MediaTools to deliver video from network/IP cameras and video servers into DirectShow environment</title>
		<link>http://alax.info/blog/741</link>
		<comments>http://alax.info/blog/741#comments</comments>
		<pubDate>Sat, 10 Jan 2009 12:52:46 +0000</pubDate>
		<dc:creator>Roman</dc:creator>
				<category><![CDATA[ATL]]></category>
		<category><![CDATA[Media Tools]]></category>
		<category><![CDATA[Source]]></category>
		<category><![CDATA[Video]]></category>
		<category><![CDATA[WTL]]></category>
		<category><![CDATA[C++]]></category>
		<category><![CDATA[camera]]></category>
		<category><![CDATA[DirectShow]]></category>
		<category><![CDATA[HTTP]]></category>
		<category><![CDATA[JPEG]]></category>
		<category><![CDATA[M-JPEG]]></category>

		<guid isPermaLink="false">http://alax.info/blog/?p=741</guid>
		<description><![CDATA[<a href="http://alax.info/blog/741" title="MediaTools to deliver video from network/IP cameras and video servers into DirectShow environment"></a>I decided to gather DirectShow code and filters related to processing video from network/IP cameras and video servers into a library (in fact, a few libraries) so that it could be easily used for testing, research and other purposes. As &#8230;<p class="read-more"><a href="http://alax.info/blog/741">Read more &#187;</a></p>]]></description>
			<content:encoded><![CDATA[<a href="http://alax.info/blog/741" title="MediaTools to deliver video from network/IP cameras and video servers into DirectShow environment"></a><p>I decided to gather DirectShow code and filters related to processing video from network/IP cameras and video servers into a library (in fact, a few libraries) so that it could be easily used for testing, research and other purposes. As time is going to permit, documentation and sample code will be provided, further development will be carried out.</p>
<p>This initial post publishes two libraries (DLLs) which host <a href="http://msdn.microsoft.com/en-us/library/ms783323(VS.85).aspx">DirectShow</a> filters to receive <a href="http://en.wikipedia.org/wiki/JPEG">JPEG</a> or <a href="http://en.wikipedia.org/wiki/MJPEG#M-JPEG_over_HTTP">M-JPEG</a> video from network using HTTP based protocol, decode video with the help of <a href="http://www.intel.com/cd/software/products/asmo-na/eng/302910.htm">Intel IPP 6.0 library</a> (UMC version of the JPEG implementation), as well as perform additional helpful features, including writing series of frames into .JPG files and emulating video feed from saved .JPG files, conversion filters to obtain video in 24-bit and 32-bit <a href="http://fourcc.org/rgb.php#BI_RGB">RGB</a> formats, <a href="http://fourcc.org/yuv.php#YUY2">YUY2</a> and <a href="http://fourcc.org/yuv.php#YV12">YV12</a> formats.</p>
<h2>File and Class Summary</h2>
<h3>Acqusition.dll</h3>
<p>Acqusition.dll (<a href="http://www.assembla.com/code/roatl-utilities/subversion/nodes/trunk/MediaTools/_Bin/Release Trace/Acquisition.dll?format=raw">download</a>) hosts the following classes:</p>
<ul>
<li>DirectShow Filters
<ul>
<li><span style="text-decoration: underline;">HTTP Stream Source Filter</span>, to receive HTTP content and deliver into DirectShow environment through output pin</li>
<li><span style="text-decoration: underline;">JPEG HTTP Stream Parser Filter</span>, to parse HTTP content (typically received from HTTP Stream Source Filter) of image/jpeg and multipart/x-mixed-replace types and output JPEG frames</li>
<li><span style="text-decoration: underline;">JPEG Multi File Renderer Filter</span>, to write parsed JPEG frames (typically received from JPEG HTTP Stream Parser Filter) into files</li>
<li><span style="text-decoration: underline;">JPEG Multi File Source Filter</span>, to read JPEG files (typically written by JPEG Multi File Renderer Filter) and stream video into DirectShow environmentto emulate video feed</li>
</ul>
</li>
</ul>
<p>Acqusition.dll is dependent only on well known DLLs and does not require presence/redistribution of specific dependency files.</p>
<h3>CodingI.dll</h3>
<p>CodingI.dll (<a href="http://www.assembla.com/code/roatl-utilities/subversion/nodes/trunk/MediaTools/_Bin/Release%20Trace/CodingI.dll?format=raw">download</a>) hosts the following classes:</p>
<ul>
<li>DirectShow Filters
<ul>
<li><span style="text-decoration: underline;">JPEG Frame Decoder Filter</span>, to parse JPEG data and pass frames downstream with a corresponding mediatype provided with VIDEOINFOHEADER format and correct resolution; in case of resolution changes the filter is capable of dynamically re-agreeing media type with downstream peer</li>
<li><span style="text-decoration: underline;">JPEG Decoder Filter</span>, to decode JPEG data into 24-bit/32-bit RGB (unfortunately Intel IPP codec has limited capabilities of decoding video into YUV pixel formats)</li>
<li><span style="text-decoration: underline;">YUY2 Encoder Filter</span>, to convert RGB data into YUY2 pixel format</li>
<li><span style="text-decoration: underline;">YV12 Encoder Filter</span>, to convert RGB data into YV12 pixel format</li>
</ul>
</li>
<li>Shell Extensions
<ul>
<li><span style="text-decoration: underline;">JPEG File Resolution Shell Property Page</span>, to provide additional information (such as sampling, color format, resolution) about .JPG and .JPEG files through a shell property page</li>
</ul>
</li>
</ul>
<p>CodingI.dll is dependent on <a href="http://www.intel.com/cd/software/products/asmo-na/eng/302910.htm">Intel IPP 6.0 library</a> DLLs and relies on availability of these dependencies in the system. For the CodingI.dll to be operationable, it is required to have a free, trial or registered version of Intel IPP library installed. In particular, the files that are sufficient to be present/redistributed are:</p>
<ul>
<li>libguide40.dll, libiomp5md.dll</li>
<li>ippcore-6.0.dll</li>
<li>ippi-6.0.dll, ippj-6.0.dll, ipps-6.0.dll, ippcc-6.0.dll, ippvc-6.0.dll</li>
<li>ippipx-6.0.dll, ippjpx-6.0.dll, ippspx-6.0.dll, ippccpx-6.0.dll, ippvcpx-6.0.dll</li>
</ul>
<h2>Quick Usage Example</h2>
<p>Given a M-JPEG compatible network camera on IP address 98.76.54.32, the graph constructed as shown below is capable to deliver video data and render it through standard <a href="http://msdn.microsoft.com/en-us/library/ms787917(VS.85).aspx">Video Mixing Renderer Filter</a>.</p>
<p>Assume the camera is <a href="http://www.stardot.com/netcamsc/index.html">StarDot NetCam SC</a> series, with /jpeg.cgi HTTP request to query for JPEG image and /nph-mjpeg.cgi HTTP request to query for M-JPEG video feed.</p>
<p>To construct the graph in <a href="http://msdn.microsoft.com/en-us/library/ms787460(VS.85).aspx">GraphEdit</a> (<a href="http://www.monogram.sk/">GraphStudio</a>), first it is required to manually add <strong>Alax.Info HTTP Stream Source Filter</strong> and provide HTTP URL for the request in the property page:</p>
<p><a href="http://alax.info/blog/wp-content/uploads/2009/01/10-image001.png"><img class="alignnone size-medium wp-image-744" title="HTTP Stream Source Filter Properties" src="http://alax.info/blog/wp-content/uploads/2009/01/10-image001-259x300.png" alt="" width="259" height="300" /></a></p>
<p>Then an <strong>Alax.Info JPEG HTTP Stream Parser Filter</strong> is added and connected downstream to the previously added source filter:</p>
<p><a href="http://alax.info/blog/wp-content/uploads/2009/01/10-image002.png"><img class="alignnone size-medium wp-image-745" title="Rendering JPEG HTTP Stream Parser Filter output pin" src="http://alax.info/blog/wp-content/uploads/2009/01/10-image002-300x153.png" alt="" width="300" height="153" /></a></p>
<p>A this point it is possible to automatically render output pin and DirectShow intelligent connect will add the rest of required filters, <strong>Alax.Info JPEG Frame Decoder (I)</strong>, <strong>Alax.Info JPEG Decoder (I)</strong> and Video Renderer.</p>
<p><a href="http://alax.info/blog/wp-content/uploads/2009/01/10-image003.png"><img class="alignnone size-medium wp-image-746" title="StarDot NetCam SC5 M-JPEG Video Streaming Filter Graph" src="http://alax.info/blog/wp-content/uploads/2009/01/10-image003-300x154.png" alt="" width="300" height="154" /></a></p>
<p>However, in order for the graph to run in GraphEdit it is required to manually provide correct video resolution in the properties of JPEG Frame Decoder Filter and once applied reconnect all downstream connections up to video renderer in order to enforce new media type.</p>
<p><a href="http://alax.info/blog/wp-content/uploads/2009/01/10-image004.png"><img class="alignnone size-medium wp-image-747" title="JPEG Frame Decoder Filter Properties" src="http://alax.info/blog/wp-content/uploads/2009/01/10-image004-259x300.png" alt="" width="259" height="300" /></a></p>
<p>Running the graph will start streaming video.</p>
<h2>Class Overview</h2>
<h3>HTTP Stream Source Filter</h3>
<p>The filter sends one or series of HTTP requests to receive data from network location and stream received data into DirectShow environment.</p>
<p><span id="more-741"></span></p>
<ul>
<li>Filter Executable: Acquisition.dll</li>
<li>Filter CLSID: __uuidof(HttpStreamSourceFilter) {943AC94A-3188-4ABC-9BD0-6CFF37CEBBCE}</li>
<li>Filter Property Page CLSID: __uuidof(HttpStreamSourceFilterLocationPropertyPage), {91EF5CEC-30D1-4e2a-871D-F50A8CB4A7B1}</li>
<li>Filter Merit: <a href="http://msdn.microsoft.com/en-us/library/ms787275(VS.85).aspx">MERIT_UNLIKELY</a></li>
<li>Filter Category: <a href="http://msdn.microsoft.com/en-us/library/ms783347(VS.85).aspx">CLSID_LegacyAmFilterCategory</a></li>
<li>Filter Interfaces: <a href="http://msdn.microsoft.com/en-us/library/ms682273(VS.85).aspx">IPersistStreamInit</a>, <a href="http://msdn.microsoft.com/en-us/library/ms690091(VS.85).aspx">IPersistStream</a>, <a href="http://msdn.microsoft.com/en-us/library/ms695217(VS.85).aspx">ISpecifyPropertyPages</a>, <a href="http://msdn.microsoft.com/en-us/library/ms784601(VS.85).aspx">IBaseFilter</a>, <a href="http://msdn.microsoft.com/en-us/library/ms785914(VS.85).aspx">IMediaFilter</a>, <a href="http://msdn.microsoft.com/en-us/library/ms688695(VS.85).aspx">IPersist</a>, <a href="http://msdn.microsoft.com/en-us/library/ms683857.aspx">IConnectionPointContainer</a>, <a href="http://msdn.microsoft.com/en-us/library/ms784083(VS.85).aspx">IAMovieSetup</a>, <a href="http://msdn.microsoft.com/en-us/library/ms783950(VS.85).aspx">IAMFilterMiscFlags</a>, IHttpStreamSourceFilter, <a href="http://msdn.microsoft.com/en-us/library/ms221608.aspx">IDispatch</a>, <a href="http://msdn.microsoft.com/en-us/library/ms785718.aspx">IFileSourceFilter</a> (not available in graphedt.exe process)</li>
<li>Filter Pins: single output pin (Output)</li>
<li>Output Pin Media Types: MEDIATYPE_Stream/MEDIASUBTYPE_NULL</li>
<li>Output Pin Interfaces: <a href="http://msdn.microsoft.com/en-us/library/ms786565(VS.85).aspx">IPin</a>, <a href="http://msdn.microsoft.com/en-us/library/ms784095(VS.85).aspx">IAMPushSource</a>, <a href="http://msdn.microsoft.com/en-us/library/ms784095(VS.85).aspx">IAMLatency</a></li>
</ul>
<h4>Remarks</h4>
<p>Filter is a live source and delivers raw data received from network HTTP request(s) in an endless manner. In case the HTTP response is of a finite Content-Length, filter will continuously repeat request. Each first media sample of a response is marked with <a href="http://msdn.microsoft.com/en-us/library/ms779271(VS.85).aspx">AM_SAMPLE_DATADISCONTINUITY</a> flag.</p>
<p>Filter exposes connection point and events for the top level application to be able to receive error events as well as callbacks to modify HTTP request verb and object name immediately before the request is sent to network.</p>
<p>Filter is using custom memory allocator through which is exposes <strong>IServiceProvider</strong> interface on the media samples through which downstream filters could gain access to <strong>IHttpStreamSourceHeaders</strong> interface and obtain HTTP response headers.</p>
<h3>JPEG HTTP Stream Parser Filter</h3>
<p>The filter takes data stream on the input and parses streams of <em>image/jpeg</em> and <em>multipart/x-mixed-replace</em> MIME content types into JPEG frames, so that each output media sample contains one JPEG frame.</p>
<ul>
<li>Filter Executable: Acquisition.dll</li>
<li>Filter CLSID: __uuidof(JpegHttpStreamParserFilter) {805469B4-6F03-4532-88C1-7A07A7C8961C}</li>
<li>Filter Property Page CLSID: N/A</li>
<li>Filter Merit: <a href="http://msdn.microsoft.com/en-us/library/ms787275(VS.85).aspx">MERIT_UNLIKELY</a></li>
<li>Filter Category: <a href="http://msdn.microsoft.com/en-us/library/ms783347(VS.85).aspx">CLSID_LegacyAmFilterCategory</a></li>
<li>Filter Interfaces: <a href="http://msdn.microsoft.com/en-us/library/ms682273(VS.85).aspx">IPersistStreamInit</a>, <a href="http://msdn.microsoft.com/en-us/library/ms690091(VS.85).aspx">IPersistStream</a>, <a href="http://msdn.microsoft.com/en-us/library/ms695217(VS.85).aspx">ISpecifyPropertyPages</a>, <a href="http://msdn.microsoft.com/en-us/library/ms784601(VS.85).aspx">IBaseFilter</a>, <a href="http://msdn.microsoft.com/en-us/library/ms785914(VS.85).aspx">IMediaFilter</a>, <a href="http://msdn.microsoft.com/en-us/library/ms688695(VS.85).aspx">IPersist</a>, <a href="http://msdn.microsoft.com/en-us/library/ms784083(VS.85).aspx">IAMovieSetup</a>, <a href="http://msdn.microsoft.com/en-us/library/ms783950(VS.85).aspx">IAMFilterMiscFlags</a>, IJpegHttpStreamParserFilter, <a href="http://msdn.microsoft.com/en-us/library/ms221608.aspx">IDispatch</a></li>
<li>Filter Pins: single input and single output pin (Input, Output)</li>
<li>Input Pin Media Types: MEDIATYPE_Stream/MEDIASUBTYPE_NULL</li>
<li>Input Pin Interfaces: <a href="http://msdn.microsoft.com/en-us/library/ms786565(VS.85).aspx">IPin</a>, <a href="http://msdn.microsoft.com/en-us/library/ms786054(VS.85).aspx">IMemInputPin</a><a href="http://msdn.microsoft.com/en-us/library/ms784095(VS.85).aspx"></a></li>
<li>Output Pin Media Types: MEDIATYPE_Video/MEDIASUBTYPE_JPEG (FOURCC &#8216;AIJ0&#8242;), MEDIATYPE_Stream/MEDIASUBTYPE_JPEG (FOURCC &#8216;AIJ0&#8242;)</li>
<li>Output Pin Interfaces: <a href="http://msdn.microsoft.com/en-us/library/ms786565(VS.85).aspx">IPin</a>, <a href="http://msdn.microsoft.com/en-us/library/ms786015(VS.85).aspx">IMediaSeeking</a>, <a href="http://msdn.microsoft.com/en-us/library/ms785974(VS.85).aspx">IMediaPosition</a>, <a href="http://msdn.microsoft.com/en-us/library/ms221608.aspx">IDispatch</a><a href="http://msdn.microsoft.com/en-us/library/ms784095(VS.85).aspx"></a></li>
</ul>
<h4>Remarks</h4>
<p>Filter is using custom memory allocator through which is exposes <strong>IServiceProvider</strong> interface on the media samples through which downstream filters could gain access to <strong>IHttpStreamSourceHeaders</strong> interface and obtain HTTP response headers, both original response and subheaders of multipart Content-Type parts.</p>
<h3>JPEG MultiFile Renderer Filter</h3>
<p>The filter received JPEG frames and writes data into separate .JPG files, one per frame, into provided directory.</p>
<ul>
<li>Filter Executable: Acquisition.dll</li>
<li>Filter CLSID: __uuidof(JpegMultiFileRendererFilter) {4194A70D-7FB0-4362-973E-B58EA5690FE6}</li>
<li>Filter Property Page CLSID: __uuidof(JpegMultiFileRendererFilterDirectoryPropertyPage), {300AAAC6-9D89-4633-A7A8-CF7F22D5492F}</li>
<li>Filter Merit: <a href="http://msdn.microsoft.com/en-us/library/ms787275(VS.85).aspx">MERIT_DO_NOT_USE</a></li>
<li>Filter Category: <a href="http://msdn.microsoft.com/en-us/library/ms783347(VS.85).aspx">CLSID_LegacyAmFilterCategory</a></li>
<li>Filter Interfaces: <a href="http://msdn.microsoft.com/en-us/library/ms682273(VS.85).aspx">IPersistStreamInit</a>, <a href="http://msdn.microsoft.com/en-us/library/ms690091(VS.85).aspx">IPersistStream</a>, <a href="http://msdn.microsoft.com/en-us/library/ms695217(VS.85).aspx">ISpecifyPropertyPages</a>, <a href="http://msdn.microsoft.com/en-us/library/ms784601(VS.85).aspx">IBaseFilter</a>, <a href="http://msdn.microsoft.com/en-us/library/ms785914(VS.85).aspx">IMediaFilter</a>, <a href="http://msdn.microsoft.com/en-us/library/ms688695(VS.85).aspx">IPersist</a>, <a href="http://msdn.microsoft.com/en-us/library/ms683857.aspx">IConnectionPointContainer</a>, <a href="http://msdn.microsoft.com/en-us/library/ms784083(VS.85).aspx">IAMovieSetup</a>, <a href="http://msdn.microsoft.com/en-us/library/ms783950(VS.85).aspx">IAMFilterMiscFlags</a>, IJpegMultiFileRendererFilter, <a href="http://msdn.microsoft.com/en-us/library/ms221608.aspx">IDispatch</a>, <a href="http://msdn.microsoft.com/en-us/library/ms785712.aspx">IFileSinkFilter2</a> (not available in graphedt.exe process), <a href="http://msdn.microsoft.com/en-us/library/ms785715(VS.85).aspx">IFileSinkFilter</a> (not available in graphedt.exe process)</li>
<li>Filter Pins: single input pin (Input)</li>
<li>Input Pin Media Types: MEDIATYPE_Video/MEDIASUBTYPE_JPEG (FOURCC &#8216;AIJ0&#8242;)</li>
<li>Input Pin Interfaces:ï¿½<a href="http://msdn.microsoft.com/en-us/library/ms786565(VS.85).aspx">IPin</a>, <a href="http://msdn.microsoft.com/en-us/library/ms786054(VS.85).aspx">IMemInputPin</a><a href="http://msdn.microsoft.com/en-us/library/ms784095(VS.85).aspx"></a></li>
</ul>
<h4>Remarks</h4>
<p>None.</p>
<h3>JPEG MultiFile Source Filter</h3>
<p>The filter reads contents of provided directory and stream contained .JPG files emulating a video feed.</p>
<ul>
<li>Filter Executable: Acquisition.dll</li>
<li>Filter CLSID: __uuidof(JpegMultiFileSourceFilter) {B749D696-E479-44dc-AF17-220EBEDFAAE8}</li>
<li>Filter Property Page CLSID: __uuidof(JpegMultiFileSourceFilterDirectoryPropertyPage), {DE611B46-F6BA-4de5-A714-BEDE243A0BAC}</li>
<li>Filter Merit: <a href="http://msdn.microsoft.com/en-us/library/ms787275(VS.85).aspx">MERIT_DO_NOT_USE</a></li>
<li>Filter Category: <a href="http://msdn.microsoft.com/en-us/library/ms783347(VS.85).aspx">CLSID_LegacyAmFilterCategory</a></li>
<li>Filter Interfaces: <a href="http://msdn.microsoft.com/en-us/library/ms682273(VS.85).aspx">IPersistStreamInit</a>, <a href="http://msdn.microsoft.com/en-us/library/ms690091(VS.85).aspx">IPersistStream</a>, <a href="http://msdn.microsoft.com/en-us/library/ms695217(VS.85).aspx">ISpecifyPropertyPages</a>, <a href="http://msdn.microsoft.com/en-us/library/ms784601(VS.85).aspx">IBaseFilter</a>, <a href="http://msdn.microsoft.com/en-us/library/ms785914(VS.85).aspx">IMediaFilter</a>, <a href="http://msdn.microsoft.com/en-us/library/ms688695(VS.85).aspx">IPersist</a>, <a href="http://msdn.microsoft.com/en-us/library/ms784083(VS.85).aspx">IAMovieSetup</a>, <a href="http://msdn.microsoft.com/en-us/library/ms783950(VS.85).aspx">IAMFilterMiscFlags</a>, IJpegMultiFileSourceFilter, <a href="http://msdn.microsoft.com/en-us/library/ms221608.aspx">IDispatch</a>, <a href="http://msdn.microsoft.com/en-us/library/ms785718.aspx">IFileSourceFilter</a> (not available in graphedt.exe process)</li>
<li>Filter Pins: single output pin (Output)</li>
<li>Output Pin Media Types: MEDIATYPE_Video/MEDIASUBTYPE_JPEG (FOURCC &#8216;AIJ0&#8242;), MEDIATYPE_Stream/MEDIASUBTYPE_JPEG (FOURCC &#8216;AIJ0&#8242;)</li>
<li>Output Pin Interfaces: <a href="http://msdn.microsoft.com/en-us/library/ms786565(VS.85).aspx">IPin</a>, <a href="http://msdn.microsoft.com/en-us/library/ms784095(VS.85).aspx">IAMPushSource</a>, <a href="http://msdn.microsoft.com/en-us/library/ms784095(VS.85).aspx">IAMLatency</a></li>
</ul>
<h4>Remarks</h4>
<p>The filter converts file time stamps into media sample time stamps to convert file write rate into DirectShow rendering/playback rate.</p>
<h3>JPEG Frame Decoder Filter</h3>
<p>The filter takes raw JPEG input media samples in the input, parses JPEG headers and outputs media samples supplied with valid <a href="http://msdn.microsoft.com/en-us/library/ms787915(VS.85).aspx">VIDEOINFOHEADER</a> format with correct resolution.</p>
<ul>
<li>Filter Executable: CodingI.dll</li>
<li>Filter CLSID: __uuidof(JpegFrameDecoderFilter) {EA070483-8D39-4782-8C7B-489AD8B6177F}</li>
<li>Filter Property Page CLSID: __uuidof(JpegFrameDecoderFilterResolutionPropertyPage), {E14A1F56-A683-4ec2-86B0-F7B6EABF7DC6}</li>
<li>Filter Merit: <a href="http://msdn.microsoft.com/en-us/library/ms787275(VS.85).aspx">MERIT_UNLIKELY &#8211; 1<br />
</a></li>
<li>Filter Category: <a href="http://msdn.microsoft.com/en-us/library/ms783347(VS.85).aspx">CLSID_LegacyAmFilterCategory</a></li>
<li>Filter Interfaces: <a href="http://msdn.microsoft.com/en-us/library/ms682273(VS.85).aspx">IPersistStreamInit</a>, <a href="http://msdn.microsoft.com/en-us/library/ms690091(VS.85).aspx">IPersistStream</a>, <a href="http://msdn.microsoft.com/en-us/library/ms695217(VS.85).aspx">ISpecifyPropertyPages</a>, <a href="http://msdn.microsoft.com/en-us/library/ms784601(VS.85).aspx">IBaseFilter</a>, <a href="http://msdn.microsoft.com/en-us/library/ms785914(VS.85).aspx">IMediaFilter</a>, <a href="http://msdn.microsoft.com/en-us/library/ms688695(VS.85).aspx">IPersist</a>, <a href="http://msdn.microsoft.com/en-us/library/ms683857.aspx">IConnectionPointContainer</a>, <a href="http://msdn.microsoft.com/en-us/library/ms784083(VS.85).aspx">IAMovieSetup</a>, <a href="http://msdn.microsoft.com/en-us/library/ms783950(VS.85).aspx">IAMFilterMiscFlags</a>, IJpegFrameDecoderFilter, <a href="http://msdn.microsoft.com/en-us/library/ms221608.aspx">IDispatch</a></li>
<li>Filter Pins: single input and single output pin (Input, Output)</li>
<li>Input Pin Media Types: MEDIATYPE_Video/MEDIASUBTYPE_JPEG (FOURCC &#8216;AIJ0&#8242;)</li>
<li>Input Pin Interfaces: <a href="http://msdn.microsoft.com/en-us/library/ms786565(VS.85).aspx">IPin</a>, <a href="http://msdn.microsoft.com/en-us/library/ms786054(VS.85).aspx">IMemInputPin</a></li>
<li>Output Pin Media Types: MEDIATYPE_Video/MEDIASUBTYPE_JPEG (FOURCC &#8216;AIJ0&#8242;)/FORMAT_VideoInfo</li>
<li>Output Pin Interfaces: <a href="http://msdn.microsoft.com/en-us/library/ms786565(VS.85).aspx">IPin</a>, <a href="http://msdn.microsoft.com/en-us/library/ms786015(VS.85).aspx">IMediaSeeking</a>, <a href="http://msdn.microsoft.com/en-us/library/ms785974(VS.85).aspx">IMediaPosition</a>, <a href="http://msdn.microsoft.com/en-us/library/ms221608.aspx">IDispatch</a></li>
</ul>
<h4>Remarks</h4>
<p>Filter is attempting to dynamically re-agree media type with downstream filter in case media type changes. Initialially in absence of data about effective video resolution, the filter uses default resolution (320&#215;240 or overridden through private interface <strong>IJpegFrameDecoderFilter</strong>.</p>
<p>Filter is attempting to share memory allocators on input and output pins to be able to pass media samples transparently without copying data.</p>
<p>Filter exposes connection point and events for the top level application to be able to receive resolution change events.</p>
<h3>JPEG Decoder Filter</h3>
<p>The filter decodes input media samples of JPEGï¿½ format and outputs 24-bit/32-bit RGB media samples.</p>
<ul>
<li>Filter Executable: CodingI.dll</li>
<li>Filter CLSID: __uuidof(JpegFrameFilter) {28A8C753-363C-460a-9D99-74E534A5114F}</li>
<li>Filter Property Page CLSID: N/A</li>
<li>Filter Merit: <a href="http://msdn.microsoft.com/en-us/library/ms787275(VS.85).aspx">MERIT_NORMAL + 0&#215;10<br />
</a></li>
<li>Filter Category: <a href="http://msdn.microsoft.com/en-us/library/ms783347(VS.85).aspx">CLSID_LegacyAmFilterCategory</a></li>
<li>Filter Interfaces: <a href="http://msdn.microsoft.com/en-us/library/ms682273(VS.85).aspx">IPersistStreamInit</a>, <a href="http://msdn.microsoft.com/en-us/library/ms690091(VS.85).aspx">IPersistStream</a>, <a href="http://msdn.microsoft.com/en-us/library/ms695217(VS.85).aspx">ISpecifyPropertyPages</a>, <a href="http://msdn.microsoft.com/en-us/library/ms784601(VS.85).aspx">IBaseFilter</a>, <a href="http://msdn.microsoft.com/en-us/library/ms785914(VS.85).aspx">IMediaFilter</a>, <a href="http://msdn.microsoft.com/en-us/library/ms688695(VS.85).aspx">IPersist</a>, <a href="http://msdn.microsoft.com/en-us/library/ms683857.aspx">IConnectionPointContainer</a>, <a href="http://msdn.microsoft.com/en-us/library/ms784083(VS.85).aspx">IAMovieSetup</a>, <a href="http://msdn.microsoft.com/en-us/library/ms783950(VS.85).aspx">IAMFilterMiscFlags</a>, IJpegDecoderFilter, <a href="http://msdn.microsoft.com/en-us/library/ms221608.aspx">IDispatch</a></li>
<li>Filter Pins: single input and single output pin (Input, Output)</li>
<li>Input Pin Media Types: MEDIATYPE_Video/MEDIASUBTYPE_JPEG (FOURCC &#8216;AIJ0&#8242;)/FORMAT_VideoInfo</li>
<li>Input Pin Interfaces: <a href="http://msdn.microsoft.com/en-us/library/ms786565(VS.85).aspx">IPin</a>, <a href="http://msdn.microsoft.com/en-us/library/ms786054(VS.85).aspx">IMemInputPin</a></li>
<li>Output Pin Media Types: MEDIATYPE_Video/MEDIASUBTYPE_RGB24/FORMAT_VideoInfo, MEDIATYPE_Video/MEDIASUBTYPE_RGB32/FORMAT_VideoInfo</li>
<li>Output Pin Interfaces: <a href="http://msdn.microsoft.com/en-us/library/ms786565(VS.85).aspx">IPin</a>, <a href="http://msdn.microsoft.com/en-us/library/ms786015(VS.85).aspx">IMediaSeeking</a>, <a href="http://msdn.microsoft.com/en-us/library/ms785974(VS.85).aspx">IMediaPosition</a>, <a href="http://msdn.microsoft.com/en-us/library/ms221608.aspx">IDispatch</a></li>
</ul>
<h4>Remarks</h4>
<p>Filter is attempting to re-agree media type on the output pin in case it receives a request to change media type on the input pin, in order to transparently support dynamic resolution change.</p>
<h3>YUY2 Encoder Filter</h3>
<p>The filter converts 24-bit and 32-bit RGB media samples into <a href="http://fourcc.org/yuv.php#YUY2">YUY2</a> pixel format.</p>
<ul>
<li>Filter Executable: CodingI.dll</li>
<li>Filter CLSID: __uuidof(Yuy2EncoderFilter) {5302581E-A3B2-408b-BC23-71ECA8BC8885}</li>
<li>Filter Property Page CLSID: N/A</li>
<li>Filter Merit: <a href="http://msdn.microsoft.com/en-us/library/ms787275(VS.85).aspx">MERIT_DO_NOT_USE + 0&#215;10<br />
</a></li>
<li>Filter Category: <a href="http://msdn.microsoft.com/en-us/library/ms783347(VS.85).aspx">CLSID_LegacyAmFilterCategory</a></li>
<li>Filter Interfaces: <a href="http://msdn.microsoft.com/en-us/library/ms784601(VS.85).aspx">IBaseFilter</a>, <a href="http://msdn.microsoft.com/en-us/library/ms785914(VS.85).aspx">IMediaFilter</a>, <a href="http://msdn.microsoft.com/en-us/library/ms688695(VS.85).aspx">IPersist</a>, <a href="http://msdn.microsoft.com/en-us/library/ms784083(VS.85).aspx">IAMovieSetup</a>, <a href="http://msdn.microsoft.com/en-us/library/ms783950(VS.85).aspx">IAMFilterMiscFlags</a></li>
<li>Filter Pins: single input and single output pin (Input, Output)</li>
<li>Input Pin Media Types: MEDIATYPE_Video/MEDIASUBTYPE_RGB24/FORMAT_VideoInfo, MEDIATYPE_Video/MEDIASUBTYPE_RGB32/FORMAT_VideoInfo</li>
<li>Input Pin Interfaces: <a href="http://msdn.microsoft.com/en-us/library/ms786565(VS.85).aspx">IPin</a>, <a href="http://msdn.microsoft.com/en-us/library/ms786054(VS.85).aspx">IMemInputPin</a></li>
<li>Output Pin Media Types: MEDIATYPE_Video/MEDIASUBTYPE_YUY2/FORMAT_VideoInfo,</li>
<li>Output Pin Interfaces: <a href="http://msdn.microsoft.com/en-us/library/ms786565(VS.85).aspx">IPin</a>, <a href="http://msdn.microsoft.com/en-us/library/ms786015(VS.85).aspx">IMediaSeeking</a>, <a href="http://msdn.microsoft.com/en-us/library/ms785974(VS.85).aspx">IMediaPosition</a>, <a href="http://msdn.microsoft.com/en-us/library/ms221608.aspx">IDispatch</a></li>
</ul>
<h4>Remarks</h4>
<p>Filter is attempting to re-agree media type on the output pin in case it receives a request to change media type on the input pin, in order to transparently support dynamic resolution change.</p>
<h3>YV12 Encoder Filter</h3>
<p>The filter converts 24-bit and 32-bit RGB media samples into <a href="http://fourcc.org/yuv.php#YV12">YV12</a> pixel format.</p>
<ul>
<li>Filter Executable: CodingI.dll</li>
<li>Filter CLSID: __uuidof(Yv12EncoderFilter) {CDC777A0-0DB0-4a01-9C42-F23F053F9F36}</li>
<li>Filter Property Page CLSID: N/A</li>
<li>Filter Merit: <a href="http://msdn.microsoft.com/en-us/library/ms787275(VS.85).aspx">MERIT_DO_NOT_USE + 0&#215;10<br />
</a></li>
<li>Filter Category: <a href="http://msdn.microsoft.com/en-us/library/ms783347(VS.85).aspx">CLSID_LegacyAmFilterCategory</a></li>
<li>Filter Interfaces: <a href="http://msdn.microsoft.com/en-us/library/ms784601(VS.85).aspx">IBaseFilter</a>, <a href="http://msdn.microsoft.com/en-us/library/ms785914(VS.85).aspx">IMediaFilter</a>, <a href="http://msdn.microsoft.com/en-us/library/ms688695(VS.85).aspx">IPersist</a>, <a href="http://msdn.microsoft.com/en-us/library/ms784083(VS.85).aspx">IAMovieSetup</a>, <a href="http://msdn.microsoft.com/en-us/library/ms783950(VS.85).aspx">IAMFilterMiscFlags</a></li>
<li>Filter Pins: single input and single output pin (Input, Output)</li>
<li>Input Pin Media Types: MEDIATYPE_Video/MEDIASUBTYPE_RGB24/FORMAT_VideoInfo, MEDIATYPE_Video/MEDIASUBTYPE_RGB32/FORMAT_VideoInfo</li>
<li>Input Pin Interfaces: <a href="http://msdn.microsoft.com/en-us/library/ms786565(VS.85).aspx">IPin</a>, <a href="http://msdn.microsoft.com/en-us/library/ms786054(VS.85).aspx">IMemInputPin</a></li>
<li>Output Pin Media Types: MEDIATYPE_Video/MEDIASUBTYPE_YV12/FORMAT_VideoInfo,</li>
<li>Output Pin Interfaces: <a href="http://msdn.microsoft.com/en-us/library/ms786565(VS.85).aspx">IPin</a>, <a href="http://msdn.microsoft.com/en-us/library/ms786015(VS.85).aspx">IMediaSeeking</a>, <a href="http://msdn.microsoft.com/en-us/library/ms785974(VS.85).aspx">IMediaPosition</a>, <a href="http://msdn.microsoft.com/en-us/library/ms221608.aspx">IDispatch</a></li>
</ul>
<h4>Remarks</h4>
<p>Filter is attempting to re-agree media type on the output pin in case it receives a request to change media type on the input pin, in order to transparently support dynamic resolution change.</p>
]]></content:encoded>
			<wfw:commentRss>http://alax.info/blog/741/feed</wfw:commentRss>
		<slash:comments>14</slash:comments>
		</item>
		<item>
		<title>Network Cameras and Video Servers</title>
		<link>http://alax.info/blog/624</link>
		<comments>http://alax.info/blog/624#comments</comments>
		<pubDate>Tue, 02 Sep 2008 07:34:28 +0000</pubDate>
		<dc:creator>Roman</dc:creator>
				<category><![CDATA[Seriously]]></category>
		<category><![CDATA[camera]]></category>

		<guid isPermaLink="false">http://alax.info/blog/?p=624</guid>
		<description><![CDATA[<a href="http://alax.info/blog/624" title="Network Cameras and Video Servers"></a>An example to give an idea of how robust and reliable network cameras and video servers today are. Fl***h made video encoder hardware. The request is http://***.***.***.***/cgi-bin/***.cgi?***, it informs on capabilities of the device. ... SupportDigitalOutputCount=4 SupportDigitalIutputCount=4 ...]]></description>
			<content:encoded><![CDATA[<a href="http://alax.info/blog/624" title="Network Cameras and Video Servers"></a><p>An example to give an idea of how robust and reliable network cameras and video servers today are. Fl***h made video encoder hardware.</p>
<p>The request is http://***.***.***.***/cgi-bin/***.cgi?***, it informs on capabilities of the device.</p>
<blockquote>
<pre>...
SupportDigitalOutputCount=4
SupportDigital<span style="color: #ff0000;"><strong>Iutput</strong></span>Count=4
...</pre>
</blockquote>
]]></content:encoded>
			<wfw:commentRss>http://alax.info/blog/624/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>IQeye camera video quality</title>
		<link>http://alax.info/blog/567</link>
		<comments>http://alax.info/blog/567#comments</comments>
		<pubDate>Wed, 20 Aug 2008 17:44:14 +0000</pubDate>
		<dc:creator>Roman</dc:creator>
				<category><![CDATA[Seriously]]></category>
		<category><![CDATA[camera]]></category>
		<category><![CDATA[humor]]></category>
		<category><![CDATA[iqeye]]></category>

		<guid isPermaLink="false">http://alax.info/blog/?p=567</guid>
		<description><![CDATA[<a href="http://alax.info/blog/567" title="IQeye camera video quality"></a>That was a good one. Quality setting UI title vs. internal identifier on an IQeye705 camera: &#8220;superfine&#8221; = xlow &#8220;fine&#8221; = low &#8220;high&#8221; = medium &#8220;medium&#8221; = high]]></description>
			<content:encoded><![CDATA[<a href="http://alax.info/blog/567" title="IQeye camera video quality"></a><p>That was a good one. Quality setting UI title vs. internal identifier on an <a href="http://www.iqeye.com/iqeye700.html">IQeye705</a> camera:</p>
<ul>
<li>&#8220;superfine&#8221; = xlow</li>
<li>&#8220;fine&#8221; = low</li>
<li>&#8220;high&#8221; = medium</li>
<li>&#8220;medium&#8221; = high</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://alax.info/blog/567/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

