<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd"
	xmlns:media="http://search.yahoo.com/mrss/"
	>
<channel>
	<title>Comments on: Server-Push JPEG Stream</title>
	<atom:link href="http://adrianhoe.com/adrianhoe/2007/09/13/server-push-jpeg-stream/feed/" rel="self" type="application/rss+xml" />
	<link>http://adrianhoe.com/adrianhoe/2007/09/13/server-push-jpeg-stream/</link>
	<description>The Eccentric Logic of An Eclectic Mind</description>
	<lastBuildDate>Sat, 21 Jan 2012 02:58:06 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
	<item>
		<title>By: Adrenaline Hack &#124; Adrian Hoe&#8217;s WebLog</title>
		<link>http://adrianhoe.com/adrianhoe/2007/09/13/server-push-jpeg-stream/comment-page-1/#comment-17466</link>
		<dc:creator>Adrenaline Hack &#124; Adrian Hoe&#8217;s WebLog</dc:creator>
		<pubDate>Tue, 25 Sep 2007 06:39:35 +0000</pubDate>
		<guid isPermaLink="false">http://adrianhoe.com/adrianhoe/2007/09/13/server-push-jpeg-stream/#comment-17466</guid>
		<description>[...] Server-Push JPEG Stream [...]</description>
		<content:encoded><![CDATA[<p>[...] Server-Push JPEG Stream [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Zhang Wei</title>
		<link>http://adrianhoe.com/adrianhoe/2007/09/13/server-push-jpeg-stream/comment-page-1/#comment-16865</link>
		<dc:creator>Zhang Wei</dc:creator>
		<pubDate>Tue, 18 Sep 2007 08:01:46 +0000</pubDate>
		<guid isPermaLink="false">http://adrianhoe.com/adrianhoe/2007/09/13/server-push-jpeg-stream/#comment-16865</guid>
		<description>That&#039;s interesting. I am glad you have found a solution. Do you have any idea why Read_Some does not always read in 512 bytes?

张薇</description>
		<content:encoded><![CDATA[<p>That&#8217;s interesting. I am glad you have found a solution. Do you have any idea why Read_Some does not always read in 512 bytes?</p>
<p>张薇</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Adrian Hoe</title>
		<link>http://adrianhoe.com/adrianhoe/2007/09/13/server-push-jpeg-stream/comment-page-1/#comment-16551</link>
		<dc:creator>Adrian Hoe</dc:creator>
		<pubDate>Fri, 14 Sep 2007 13:35:07 +0000</pubDate>
		<guid isPermaLink="false">http://adrianhoe.com/adrianhoe/2007/09/13/server-push-jpeg-stream/#comment-16551</guid>
		<description>Yes! I was having the same thought and just got it all hacked and corrected.

I have a Data of 512 bytes in size. AWS.Client.Read_Some will not always read 512 bytes. When it reads less than 512 bytes, say, 500 bytes. Stream_IO.Write will always write 512 bytes. That means 12 bytes of garbage will be written after the useful 500 bytes.

I got around with that by writing to the next index of the last byte read. So I did this:

&lt;pre&gt;
&lt;code&gt;
      Ada.Streams.Stream_IO.Write (File_Handler, Data, Index);
      Index := Index + Ada.Streams.Stream_IO.Positive_Count (Offset);
&lt;/code&gt;
&lt;/pre&gt;</description>
		<content:encoded><![CDATA[<p>Yes! I was having the same thought and just got it all hacked and corrected.</p>
<p>I have a Data of 512 bytes in size. AWS.Client.Read_Some will not always read 512 bytes. When it reads less than 512 bytes, say, 500 bytes. Stream_IO.Write will always write 512 bytes. That means 12 bytes of garbage will be written after the useful 500 bytes.</p>
<p>I got around with that by writing to the next index of the last byte read. So I did this:</p>
<pre>
<code>
      Ada.Streams.Stream_IO.Write (File_Handler, Data, Index);
      Index := Index + Ada.Streams.Stream_IO.Positive_Count (Offset);
</code>
</pre>
]]></content:encoded>
	</item>
	<item>
		<title>By: 潜龙在天</title>
		<link>http://adrianhoe.com/adrianhoe/2007/09/13/server-push-jpeg-stream/comment-page-1/#comment-16550</link>
		<dc:creator>潜龙在天</dc:creator>
		<pubDate>Fri, 14 Sep 2007 13:27:35 +0000</pubDate>
		<guid isPermaLink="false">http://adrianhoe.com/adrianhoe/2007/09/13/server-push-jpeg-stream/#comment-16550</guid>
		<description>Hi Adrian,

Nice to hear that you are hacking again!

Are your sure you are writing exactly the number of bytes read?

Happy hacking! :D</description>
		<content:encoded><![CDATA[<p>Hi Adrian,</p>
<p>Nice to hear that you are hacking again!</p>
<p>Are your sure you are writing exactly the number of bytes read?</p>
<p>Happy hacking! <img src='http://adrianhoe.com/adrianhoe/blog/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Adrian Hoe</title>
		<link>http://adrianhoe.com/adrianhoe/2007/09/13/server-push-jpeg-stream/comment-page-1/#comment-16514</link>
		<dc:creator>Adrian Hoe</dc:creator>
		<pubDate>Fri, 14 Sep 2007 07:43:40 +0000</pubDate>
		<guid isPermaLink="false">http://adrianhoe.com/adrianhoe/2007/09/13/server-push-jpeg-stream/#comment-16514</guid>
		<description>Hi Zhang,

I don&#039;t think so. It is a single stream and I think the socket layer of the OS has already taken care of the read-write-wait. Thanks for the suggestion. I will investigate into your suggestion and confirm what is contributing to the corrupted JPEG images.

The problem I have at hand is that I don&#039;t have a video server running and I am connecting to a 3rd party video server given as a reference in the NDA. Again, I am quite limited to open discussion because of the NDA.

Unless, I have the access to the video server, I can download those images directly from the video server based on the time to run a diff against the stream I obtained from my program.</description>
		<content:encoded><![CDATA[<p>Hi Zhang,</p>
<p>I don&#8217;t think so. It is a single stream and I think the socket layer of the OS has already taken care of the read-write-wait. Thanks for the suggestion. I will investigate into your suggestion and confirm what is contributing to the corrupted JPEG images.</p>
<p>The problem I have at hand is that I don&#8217;t have a video server running and I am connecting to a 3rd party video server given as a reference in the NDA. Again, I am quite limited to open discussion because of the NDA.</p>
<p>Unless, I have the access to the video server, I can download those images directly from the video server based on the time to run a diff against the stream I obtained from my program.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Zhang Wei</title>
		<link>http://adrianhoe.com/adrianhoe/2007/09/13/server-push-jpeg-stream/comment-page-1/#comment-16512</link>
		<dc:creator>Zhang Wei</dc:creator>
		<pubDate>Fri, 14 Sep 2007 07:31:42 +0000</pubDate>
		<guid isPermaLink="false">http://adrianhoe.com/adrianhoe/2007/09/13/server-push-jpeg-stream/#comment-16512</guid>
		<description>Hi Adrian,

I think it is the sequential execution of read and write that might be the contributor of the corruption of the incoming JPEG stream. Try to to parallel read and write using protected type. It may solve your problem.

It is interesting enough to find someone who is working on the same area of interest. I am working on a client on Solaris but the server pushes streams of raw binary data of digital signals. I think the situation is almost similar here.

张薇</description>
		<content:encoded><![CDATA[<p>Hi Adrian,</p>
<p>I think it is the sequential execution of read and write that might be the contributor of the corruption of the incoming JPEG stream. Try to to parallel read and write using protected type. It may solve your problem.</p>
<p>It is interesting enough to find someone who is working on the same area of interest. I am working on a client on Solaris but the server pushes streams of raw binary data of digital signals. I think the situation is almost similar here.</p>
<p>张薇</p>
]]></content:encoded>
	</item>
</channel>
</rss>

