<div dir="ltr"><div><div><div><div><div><div>Hi Ross,<br><br></div>Thanks for the timely reply.I have taken a look at the Elphel code you directed me to.<br></div>Currently I have used the  Elphel model to create my own class MyJPEGVideoSource that inherits JPEGVideoSource.<br>
</div>I have copied the exact same code of ElphelJPEGDeviceSource classes and just changed the file read (initially it was /dev/ccam_dma.raw ) from to a jpg file on my hard disk.<br><br><br>ElphelJPEGDeviceSource*<br>ElphelJPEGDeviceSource::createNew(UsageEnvironment& env,<br>
                  unsigned timePerFrame) {<br>  FILE* fid = fopen( " <b>/dev/ccam_dma.raw</b> ", "rb");<br>  if (fid == NULL) {<br>    env.setResultErrMsg("Failed to open input device file");<br>
    return NULL;<br>  }<br>  return new ElphelJPEGDeviceSource(env, fid, timePerFrame);<br>}<br><br>to this,<br><br>MyJPEGVideoSource*<br>MyJPEGVideoSource::createNew(UsageEnvironment& env,<br>                  unsigned timePerFrame) {<br>
  FILE* fid = fopen(" <b> /path/to/my/jpgFile  </b>", "rb");<br>  if (fid == NULL) {<br>    env.setResultErrMsg("Failed to open input device file");<br>    return NULL;<br>  }<br>  return new MyJPEGVideoSource(env, fid, timePerFrame);<br>
}<br><br></div>Now the the RTSP server to stream JPEG/RTP is ready and I am able to stream this over a player like VLC.<br></div>The problem I am facing now is that  if I use a client such as testRTSPClient and try to store the fReceiveBuffer to a .jpg file, the jpg file is unreadable using a image viewer. I need the testRTSPClient to store the jpg (as its of high priority to me).<br>
</div><div>Now is the problem with the RTSP server or is the testRTSPClient is incapable of acquiring jpeg images is my question.<br></div><div>Or is there something kind of code that I  should add on to the MyJPEGVideoSource , please do help.<br>
</div><div>Any kind of help is appreciated.<br><br></div><div>Thanks in Advance,<br></div><div>King<br></div><div><br></div><div><br></div><div><div><div><br></div></div></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">
On Sat, Aug 16, 2014 at 5:20 PM, live king <span dir="ltr"><<a href="mailto:liveking130@gmail.com" target="_blank">liveking130@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr"><div><div><div><div>Hi all,<br><br></div>I want to use the test program testOnDemandRTSPServer to stream JPEG over RTP and use the testRTSPClient to save that frame received in fReceiveBuffer into a jpg file.<br>

</div>Can anyone please suggest how I can go about doing it<br><br><br></div>Thanks,<br></div>King<br></div>
</blockquote></div><br></div>