[Live-devel] testRTSPClient and MJPEG decoding

Ross Finlayson finlayson at live555.com
Wed Jul 24 13:02:38 PDT 2013


> Thanks for the response. Ok, does that mean the data in the sink will have already been processed by JPEGVideoRTPSource::processSpecialHeader()?

Yes, but you don't have to concern yourself with how our code works.  As I said before, the data that the application-level client code (in this case "testRTSPClient") receives should be a complete JPEG video frame each time.


> I wonder if there is a bug in the JPEG packet processing because I write each JPEG frame to a file, and each appears very corrupted. It's definitely a JPEG because it opens in an image viewer, and it has the right dimensions. However, each image looks like garbage.

What happens when you try playing the stream using VLC?  (VLC also uses our RTSP/RTP client code.)


> 
> I put the following code in testRTSPClient.
> 
> void DummySink::afterGettingFrame(unsigned frameSize, unsigned numTruncatedBytes,
>  struct timeval presentationTime, unsigned /*durationInMicroseconds*/) {

You should also check the value of "numTruncatedBytes" (to make sure that it's zero).  If it's non-zero, then that means that your buffer size was too small.

Ross Finlayson
Live Networks, Inc.
http://www.live555.com/

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20130724/9714db8e/attachment.html>


More information about the live-devel mailing list