{"id":817,"date":"2009-02-14T20:08:53","date_gmt":"2009-02-14T18:08:53","guid":{"rendered":"https:\/\/alax.info\/blog\/?p=817"},"modified":"2009-02-14T20:10:13","modified_gmt":"2009-02-14T18:10:13","slug":"mediatools-http-stream-file-renderer-filter-and-more","status":"publish","type":"post","link":"https:\/\/alax.info\/blog\/817","title":{"rendered":"MediaTools: HTTP Stream File Renderer Filter and more"},"content":{"rendered":"<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>\n<p>While troubleshootting <a href=\"http:\/\/ijg.org\">JPEG<\/a> artefact issue with I used the following graph:<\/p>\n<p><a href=\"https:\/\/alax.info\/blog\/wp-content\/uploads\/2009\/02\/14-image001.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-818\" title=\"HTTP Stream File Renderer Filter in Filter Graph\" src=\"https:\/\/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\" srcset=\"https:\/\/alax.info\/blog\/wp-content\/uploads\/2009\/02\/14-image001-300x188.png 300w, https:\/\/alax.info\/blog\/wp-content\/uploads\/2009\/02\/14-image001.png 857w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<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>\n<p>Other changes include:<\/p>\n<ul>\n<li>new HTTP Stream File Renderer Filter (details are below)<\/li>\n<li>attachable media types on internally used memory allocators, which enable filters to effectively reagree media types in running state<\/li>\n<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=\"https:\/\/alax.info\/blog\/741\/comment-page-1#comment-5669\">here<\/a><\/li>\n<\/ul>\n<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>\n<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>\n<p><!--more--><\/p>\n<h2>File and Class Summary<\/h2>\n<h3>Acqusition.dll<\/h3>\n<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>\n<ul>\n<li>DirectShow Filters\n<ul>\n<li><span style=\"text-decoration: underline;\">HTTP Stream File Renderer Filter<\/span>, to write raw HTTP response headers and data into files<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h2>Class Overview<\/h2>\n<h3>HTTP Stream File Renderer Filter<\/h3>\n<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>\n<ul>\n<li>Filter Executable: Acquisition.dll<\/li>\n<li>Filter CLSID: __uuidof(HttpStreamFileRendererFilter) {B02FDAEF-E851-4380-82D6-04772E33675D}<\/li>\n<li>Filter Property Page CLSID: __uuidof(HttpStreamFileRendererFilterDirectoryPropertyPage), {FAF31D20-842A-46b4-B6F8-E410FB0188A5}<\/li>\n<li>Filter Merit: <a href=\"http:\/\/msdn.microsoft.com\/en-us\/library\/ms787275(VS.85).aspx\">MERIT_DO_NOT_USE<\/a><\/li>\n<li>Filter Category: <a href=\"http:\/\/msdn.microsoft.com\/en-us\/library\/ms783347(VS.85).aspx\">CLSID_LegacyAmFilterCategory<\/a><\/li>\n<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>,\u00a0<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>\n<li>Filter Pins: single input pin (Input)<\/li>\n<li>Input Pin Media Types: MEDIATYPE_Stream\/MEDIASUBTYPE_NULL<\/li>\n<li>Input Pin Interfaces:\u00a0<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>\n<\/ul>\n<h4>Remarks<\/h4>\n<p>None.<\/p>\n","protected":false},"excerpt":{"rendered":"<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. While troubleshootting JPEG artefact issue with I used the&hellip; <\/p>\n<p><a class=\"moretag\" href=\"https:\/\/alax.info\/blog\/817\">Read the full article<\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[11,159,13,10,20],"tags":[487,38,82,78,118,75,158,486,489],"class_list":["post-817","post","type-post","status-publish","format-standard","hentry","category-atl","category-media-tools","category-source","category-video","category-wtl","tag-atl","tag-c","tag-camera","tag-directshow","tag-http","tag-jpeg","tag-m-jpeg","tag-video","tag-wtl"],"_links":{"self":[{"href":"https:\/\/alax.info\/blog\/wp-json\/wp\/v2\/posts\/817","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/alax.info\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/alax.info\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/alax.info\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/alax.info\/blog\/wp-json\/wp\/v2\/comments?post=817"}],"version-history":[{"count":0,"href":"https:\/\/alax.info\/blog\/wp-json\/wp\/v2\/posts\/817\/revisions"}],"wp:attachment":[{"href":"https:\/\/alax.info\/blog\/wp-json\/wp\/v2\/media?parent=817"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/alax.info\/blog\/wp-json\/wp\/v2\/categories?post=817"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/alax.info\/blog\/wp-json\/wp\/v2\/tags?post=817"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}