Thanks for the response. Ok, does that mean the data in the sink will have already been processed by JPEGVideoRTPSource::processSpecialHeader()? I know the source object is correctly set to be JPEGVideoRTPSource, but I don't know if this member function gets called automatically in the RTP processing.
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. I put the following code in testRTSPClient. void DummySink::afterGettingFrame(unsigned frameSize, unsigned numTruncatedBytes, struct timeval presentationTime, unsigned /*durationInMicroseconds*/) { FrameCount++; char fname[2048]; sprintf(fname, "image_%04d.jpg", FrameCount); FILE *fout = fopen(fname,"w"); fwrite(fReceiveBuffer, frameSize, 1, fout); fclose(fout); // Then continue, to request the next frame of data: continuePlaying(); } Tim Gee<mailto:tim....@aldiscorp.com> | Senior R&D Engineer Aldis<http://www.aldiscorp.com/> | 10545 Hardin Valley Rd. | Knoxville TN | 37932 o: 865-978-6535 | f: 865-249-6608 ________________________________ From: live-devel-boun...@ns.live555.com <live-devel-boun...@ns.live555.com> on behalf of Ross Finlayson <finlay...@live555.com> Sent: Tuesday, July 23, 2013 10:12 PM To: LIVE555 Streaming Media - development & use Subject: Re: [Live-devel] testRTSPClient and MJPEG decoding I have been working with the testRTSPClient example for reading from an MJPEG camera. I understand that when afterGettingFrame() is called, fReceiveBuffer contains the raw RTP packet You understand incorrectly. All of the RTP (and RTCP) processing is done by our code; that's why our code is there. When a RTP receiver (in this case, our "testRTSPClient" application) receives data, it will be a complete (audio or video) frame. In the case of a JPEG/RTP stream (served by a RTSP server - such as a network camera), the received data will be a complete JPEG frame. Ross Finlayson Live Networks, Inc. http://www.live555.com/
<<attachment: image_0001.jpg>>
_______________________________________________ live-devel mailing list live-devel@lists.live555.com http://lists.live555.com/mailman/listinfo/live-devel