<div class="gmail_quote">On Tue, Jun 29, 2010 at 7:28 AM, Ross Finlayson <span dir="ltr">&lt;<a href="mailto:finlayson@live555.com">finlayson@live555.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
The problem is that when I come to decode the stream in VLC the image is far blockier than the original.  Why is this?  What am I doing wrong?<br>
</blockquote>
<br></div>
I don&#39;t know, in part because you&#39;re missing some details about your implementation.  In particular, you didn&#39;t say anything about your implementation of the following pure virtual functions defined for &quot;JPEGVideoSource&quot;:<br>

        virtual u_int8_t type() = 0;<br>
        virtual u_int8_t qFactor() = 0;<br>
        virtual u_int8_t width() = 0; // # pixels/8 (or 0 for 2048 pixels)<br>
        virtual u_int8_t height() = 0; // # pixels/8 (or 0 for 2048 pixels)<br>
<br>
In any case, though, I suggest that - if possible - you test your system first by receiving data into a file (by connecting a &quot;JPEGVideoRTPSource&quot; to a &quot;FileSink&quot;), and looking at the resulting data using a JPEG image viewer (rather than a media player like VLC). If your server implements RTSP, then this is easy: Just run &quot;openRTSP&quot; with the &quot;-m&quot; option.<br>
</blockquote><div><br></div><div>Hi Ross,</div><div><br></div><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo"><span style="color: #558187">TestJPEGVideoSource</span>* <span style="color: #558187">TestJPEGVideoSource</span>::createNew(UsageEnvironment&amp; <span style="color: #558187">env</span>, <span style="color: #b519a1">const</span> <span style="color: #b519a1">char</span> * fileName, <span style="color: #b519a1">unsigned</span> <span style="color: #b519a1">int</span> timePerFrame)</p>

<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo">{</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo"><span class="Apple-tab-span" style="white-space:pre">        </span>FILE * fid = fopen( fileName, <span style="color: #c92722">&quot;r&quot;</span> );</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo; min-height: 14.0px"><span class="Apple-tab-span" style="white-space:pre">        </span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo"><span class="Apple-tab-span" style="white-space:pre">        </span><span style="color: #b519a1">if</span> ( fid == <span style="color: #b519a1">NULL</span> )</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo"><span class="Apple-tab-span" style="white-space:pre">        </span>{</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo; color: #c92722"><span style="color: #000000"><span class="Apple-tab-span" style="white-space:pre">                </span></span><span style="color: #558187">env</span><span style="color: #000000">.setResultErrMsg( </span>&quot;Failed to open input device file&quot;<span style="color: #000000"> );</span></p>

<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo; color: #b519a1"><span style="color: #000000"><span class="Apple-tab-span" style="white-space:pre">                </span></span>return<span style="color: #000000"> </span>NULL<span style="color: #000000">;</span></p>

<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo"><span class="Apple-tab-span" style="white-space:pre">        </span>}</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo; min-height: 14.0px"><span class="Apple-tab-span" style="white-space:pre">        </span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo"><span class="Apple-tab-span" style="white-space:pre">        </span><span style="color: #b519a1">return</span> <span style="color: #b519a1">new</span> <span style="color: #558187">TestJPEGVideoSource</span>( <span style="color: #558187">env</span>, fid, timePerFrame );</p>

<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo">}</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo; min-height: 14.0px"><br></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo"><span style="color: #558187">TestJPEGVideoSource</span>::<span style="color: #558187">TestJPEGVideoSource</span>(UsageEnvironment&amp; <span style="color: #558187">env</span>, FILE* fid, <span style="color: #b519a1">unsigned</span> <span style="color: #b519a1">int</span> timePerFrame) </p>

<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo"><span class="Apple-tab-span" style="white-space:pre">        </span>: JPEGVideoSource(<span style="color: #558187">env</span>), fFid(fid), fTimePerFrame(timePerFrame), fNeedAFrame(False)</p>

<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo">{</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo; color: #b519a1"><span style="color: #000000"><span class="Apple-tab-span" style="white-space:pre">        </span></span>this<span style="color: #000000">-&gt;</span><span style="color: #558187">buffer</span><span style="color: #000000"> = </span>NULL<span style="color: #000000">;</span></p>

<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo"><span class="Apple-tab-span" style="white-space:pre">        </span>fseek( fid, <span style="color: #380dd6">0L</span>, SEEK_END );</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo"><span class="Apple-tab-span" style="white-space:pre">        </span>size_t sz = ftell( fFid );</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo"><span class="Apple-tab-span" style="white-space:pre">        </span>fseek( fid, <span style="color: #380dd6">0L</span>, SEEK_SET );</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo; min-height: 14.0px"><span class="Apple-tab-span" style="white-space:pre">        </span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo"><span class="Apple-tab-span" style="white-space:pre">        </span>buffer = <span style="color: #b519a1">new</span> <span style="color: #b519a1">unsigned</span> <span style="color: #b519a1">char</span>[ sz ];</p>

<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo"><span class="Apple-tab-span" style="white-space:pre">        </span>fread( buffer, <span style="color: #380dd6">1</span>, sz, fid );</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo"><span class="Apple-tab-span" style="white-space:pre">        </span><span style="color: #b519a1">bool</span> sof0 = <span style="color: #b519a1">false</span>;</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo"><span class="Apple-tab-span" style="white-space:pre">        </span><span style="color: #b519a1">bool</span> sos = <span style="color: #b519a1">false</span>;</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo; color: #558187"><span style="color: #000000"><span class="Apple-tab-span" style="white-space:pre">        </span></span><span style="color: #b519a1">this</span><span style="color: #000000">-&gt;</span>sosIndex<span style="color: #000000"> = </span><span style="color: #380dd6">0</span><span style="color: #000000">;</span></p>

<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo"><span class="Apple-tab-span" style="white-space:pre">        </span><span style="color: #b519a1">this</span>-&gt;<span style="color: #558187">sosSize</span> = <span style="color: #380dd6">0</span>;</p>

<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo; min-height: 14.0px"><span class="Apple-tab-span" style="white-space:pre">        </span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo"><span class="Apple-tab-span" style="white-space:pre">        </span><span style="color: #b519a1">for</span> ( <span style="color: #b519a1">int</span> i = <span style="color: #380dd6">0</span>; i &lt; (<span style="color: #b519a1">int</span>)(sz - <span style="color: #380dd6">8</span>); ++i )</p>

<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo"><span class="Apple-tab-span" style="white-space:pre">        </span>{</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo"><span class="Apple-tab-span" style="white-space:pre">                </span><span style="color: #b519a1">if</span> ( buffer[i] == <span style="color: #380dd6">0xFF</span> &amp;&amp; buffer[i+<span style="color: #380dd6">1</span>] == <span style="color: #380dd6">0xC0</span>)</p>

<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo"><span class="Apple-tab-span" style="white-space:pre">                </span>{</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo"><span class="Apple-tab-span" style="white-space:pre">                        </span>fLastHeight = (buffer[i+<span style="color: #380dd6">5</span>]&lt;&lt;<span style="color: #380dd6">5</span>)|(buffer[i+<span style="color: #380dd6">6</span>]&gt;&gt;<span style="color: #380dd6">3</span>);</p>

<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo"><span class="Apple-tab-span" style="white-space:pre">                        </span>fLastWidth = (buffer[i+<span style="color: #380dd6">7</span>]&lt;&lt;<span style="color: #380dd6">5</span>)|(buffer[i+<span style="color: #380dd6">8</span>]&gt;&gt;<span style="color: #380dd6">3</span>);</p>

<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo"><span class="Apple-tab-span" style="white-space:pre">                        </span><span style="color: #b519a1">if</span> ( sos &amp;&amp; sof0 ) <span style="color: #b519a1">break</span>;</p>

<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo"><span class="Apple-tab-span" style="white-space:pre">                </span>}</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo"><span class="Apple-tab-span" style="white-space:pre">                </span><span style="color: #b519a1">else</span> <span style="color: #b519a1">if</span> ( buffer[i] == <span style="color: #380dd6">0xFF</span> &amp;&amp; buffer[i+<span style="color: #380dd6">1</span>] == <span style="color: #380dd6">0xDA</span> )</p>

<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo"><span class="Apple-tab-span" style="white-space:pre">                </span>{</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo"><span class="Apple-tab-span" style="white-space:pre">                        </span>sosIndex = i + <span style="color: #380dd6">2</span>;</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo"><span class="Apple-tab-span" style="white-space:pre">                        </span><span style="color: #b519a1">if</span> ( sos &amp;&amp; sof0 ) <span style="color: #b519a1">break</span>;</p>

<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo"><span class="Apple-tab-span" style="white-space:pre">                </span>}</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo; min-height: 14.0px"><span class="Apple-tab-span" style="white-space:pre">                </span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo"><span class="Apple-tab-span" style="white-space:pre">        </span>}</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo; min-height: 14.0px"><span class="Apple-tab-span" style="white-space:pre">        </span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo"><span class="Apple-tab-span" style="white-space:pre">        </span><span style="color: #b519a1">if</span> ( <span style="color: #b519a1">this</span>-&gt;<span style="color: #558187">sosIndex</span> &gt; <span style="color: #380dd6">0</span> )</p>

<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo"><span class="Apple-tab-span" style="white-space:pre">                </span><span style="color: #b519a1">this</span>-&gt;<span style="color: #558187">sosSize</span> = sz - <span style="color: #b519a1">this</span>-&gt;<span style="color: #558187">sosIndex</span>;</p>

<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo; min-height: 14.0px"><span class="Apple-tab-span" style="white-space:pre">        </span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo; color: #c92722"><span style="color: #000000"><span class="Apple-tab-span" style="white-space:pre">        </span>printf( </span>&quot;Streaming image w=%d h=%d total_size=%d sos_size=%d\n&quot;<span style="color: #000000">, fLastWidth * </span><span style="color: #380dd6">8</span><span style="color: #000000">, fLastHeight * </span><span style="color: #380dd6">8</span><span style="color: #000000">, (</span><span style="color: #b519a1">int</span><span style="color: #000000">)sz, </span><span style="color: #b519a1">this</span><span style="color: #000000">-&gt;</span><span style="color: #558187">sosSize</span><span style="color: #000000"> );</span></p>

<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo"><span class="Apple-tab-span" style="white-space:pre">        </span>fclose(fFid);</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo">}</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo; min-height: 14.0px"><br></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo"><span style="color: #558187">TestJPEGVideoSource</span>::~TestJPEGVideoSource()</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo">{<span class="Apple-tab-span" style="white-space:pre">        </span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo"><span class="Apple-tab-span" style="white-space:pre">        </span><span style="color: #b519a1">if</span> ( <span style="color: #b519a1">this</span>-&gt;<span style="color: #558187">buffer</span> ) <span style="color: #b519a1">delete</span> [] buffer;</p>

<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo">}</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo; min-height: 14.0px"><br></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo"><span style="color: #b519a1">void</span> <span style="color: #558187">TestJPEGVideoSource</span>::doGetNextFrame()</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo">{</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo"><span class="Apple-tab-span" style="white-space:pre">        </span>fFrameSize = <span style="color: #b519a1">this</span>-&gt;<span style="color: #558187">sosSize</span>;</p>

<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo; min-height: 14.0px"><span class="Apple-tab-span" style="white-space:pre">        </span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo"><span class="Apple-tab-span" style="white-space:pre">        </span><span style="color: #b519a1">if</span> ( fFrameSize &gt; fMaxSize )</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo"><span class="Apple-tab-span" style="white-space:pre">        </span>{</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo; color: #c92722"><span style="color: #000000"><span class="Apple-tab-span" style="white-space:pre">                </span>printf( </span>&quot;Truncating frame!!\n&quot;<span style="color: #000000"> );</span></p>

<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo"><span class="Apple-tab-span" style="white-space:pre">                </span>fNumTruncatedBytes = fFrameSize - fMaxSize;</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo"><span class="Apple-tab-span" style="white-space:pre">                </span>fFrameSize = fMaxSize;</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo"><span class="Apple-tab-span" style="white-space:pre">        </span>}</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo; min-height: 14.0px"><span class="Apple-tab-span" style="white-space:pre">        </span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo"><span class="Apple-tab-span" style="white-space:pre">        </span>memcpy( fTo, <span style="color: #b519a1">this</span>-&gt;<span style="color: #558187">buffer</span> + <span style="color: #b519a1">this</span>-&gt;<span style="color: #558187">sosIndex</span>, fFrameSize );</p>

<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo; min-height: 14.0px"><span class="Apple-tab-span" style="white-space:pre">        </span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo"><span class="Apple-tab-span" style="white-space:pre">        </span><span style="color: #b519a1">if</span> ( fPresentationTime.tv_sec == <span style="color: #380dd6">0</span> &amp;&amp; fPresentationTime.tv_usec == <span style="color: #380dd6">0</span> )</p>

<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo"><span class="Apple-tab-span" style="white-space:pre">        </span>{</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo"><span class="Apple-tab-span" style="white-space:pre">                </span>gettimeofday( &amp;fPresentationTime, <span style="color: #b519a1">NULL</span> );</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo"><span class="Apple-tab-span" style="white-space:pre">        </span>} </p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo; color: #b519a1"><span style="color: #000000"><span class="Apple-tab-span" style="white-space:pre">        </span></span>else</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo"><span class="Apple-tab-span" style="white-space:pre">        </span>{</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo"><span class="Apple-tab-span" style="white-space:pre">                </span><span style="color: #b519a1">unsigned</span> uSeconds = fPresentationTime.tv_usec + ( fTimePerFrame * <span style="color: #380dd6">1000</span> );</p>

<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo"><span class="Apple-tab-span" style="white-space:pre">                </span>fPresentationTime.tv_sec += uSeconds / <span style="color: #380dd6">1000000</span>;</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo"><span class="Apple-tab-span" style="white-space:pre">                </span>fPresentationTime.tv_usec = uSeconds % <span style="color: #380dd6">1000000</span>;</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo"><span class="Apple-tab-span" style="white-space:pre">        </span>}</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo; min-height: 14.0px"><br></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo"><span class="Apple-tab-span" style="white-space:pre">        </span>fDurationInMicroseconds = fTimePerFrame * <span style="color: #380dd6">1000</span>;</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo; min-height: 14.0px"><span class="Apple-tab-span" style="white-space:pre">        </span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo"><span class="Apple-tab-span" style="white-space:pre">        </span>nextTask() = envir().taskScheduler().scheduleDelayedTask( <span style="color: #380dd6">0</span>, (TaskFunc*)FramedSource::afterGetting, <span style="color: #b519a1">this</span> );</p>

<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo">}</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo; color: #558187"><span style="color: #000000">u_int8_t </span>TestJPEGVideoSource<span style="color: #000000">::type()</span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo">{<span class="Apple-tab-span" style="white-space:pre">        </span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo; color: #b519a1"><span style="color: #000000"><span class="Apple-tab-span" style="white-space:pre">        </span></span>return<span style="color: #000000"> </span><span style="color: #380dd6">1</span><span style="color: #000000">;</span></p>

<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo">}</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo">u_int8_t <span style="color: #558187">TestJPEGVideoSource</span>::qFactor()</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo">{</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo; color: #b519a1"><span style="color: #000000"><span class="Apple-tab-span" style="white-space:pre">        </span></span>return<span style="color: #000000"> </span><span style="color: #380dd6">65</span><span style="color: #000000">;</span></p>

<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo">}</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo; color: #558187"><span style="color: #000000">u_int8_t </span>TestJPEGVideoSource<span style="color: #000000">::width()</span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo">{</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo"><span class="Apple-tab-span" style="white-space:pre">        </span><span style="color: #b519a1">return</span> fLastWidth;</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo">}</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo">u_int8_t <span style="color: #558187">TestJPEGVideoSource</span>::height()</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo">{</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo"><span class="Apple-tab-span" style="white-space:pre">        </span><span style="color: #b519a1">return</span> fLastHeight;</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo">}</p><div><br></div><div>That&#39;s pretty much it.  I have downloaded an image from an RTSP source using openRTSP saving each frame as a JPG file.  I am the using one these JPG files to be used as a source for the above code.  I have then connected using openRTSP to my server streaming back the above source.  I have attached the &#39;input&#39; image and the &#39;output&#39; image of the process.</div>
<div><br></div><div>Thanks, Andy.</div></div>