[Live-devel] testRTSPClient and MJPEG decoding

Tim Gee tim.gee at aldiscorp.com
Mon Jul 29 15:54:58 PDT 2013


I've been looking at the JPEG images in JpegSnoop and hex view. It appears that there are 4 extra bytes between the luminance and chrominance quantization tables. I've looked at the code for JPEGVideoRTPSource::processSpecialHeader(), and I don't yet see why the extra bytes would occur.

I'll keep looking.



Tim Gee<mailto:tim.gee at 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-bounces at ns.live555.com <live-devel-bounces at ns.live555.com> on behalf of Tim Gee <tim.gee at aldiscorp.com>
Sent: Sunday, July 28, 2013 3:59 PM
To: LIVE555 Streaming Media - development & use
Subject: Re: [Live-devel] testRTSPClient and MJPEG decoding

I added the line for increasing the receive buffer, but it didn't make the output images any better. Thanks for the suggestion. Anything else I should try or investigate?

Below is the continueAfterSETUP() after the addition of the new line.


void continueAfterSETUP(RTSPClient* rtspClient, int resultCode, char* resultString) {
do {
    UsageEnvironment& env = rtspClient->envir(); // alias
    StreamClientState& scs = ((ourRTSPClient*)rtspClient)->scs; // alias
    scs.subsession->sink = DummySink::createNew(env, *scs.subsession, rtspClient->url());
    env << *rtspClient << "Created a data sink for the \"" << *scs.subsession << "\" subsession\n";
    scs.subsession->miscPtr = rtspClient;
    increaseReceiveBufferTo(env, scs.subsession->rtpSource()->RTPgs()->socketNum(), 2000000);
    FramedSource *src = scs.subsession->readSource();

    scs.subsession->sink->startPlaying(*src, subsessionAfterPlaying, scs.subsession);
    if (scs.subsession->rtcpInstance() != NULL) {
        scs.subsession->rtcpInstance()->setByeHandler(subsessionByeHandler, scs.subsession);
    }
} while (0);
delete[] resultString;
setupNextSubsession(rtspClient);
}




Tim Gee<mailto:tim.gee at 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-bounces at ns.live555.com <live-devel-bounces at ns.live555.com> on behalf of Ross Finlayson <finlayson at live555.com>
Sent: Sunday, July 28, 2013 12:30 PM
To: LIVE555 Streaming Media - development & use
Subject: Re: [Live-devel] testRTSPClient and MJPEG decoding

I'm able to view the RTSP stream in VLC

OK.  One thing that VLC is doing that "testRTSPClient" is not is setting an extremely large receive buffer (in the operating system) for the RTP socket.  This may be necessary for you, because you're trying to receive a stream that uses such a ridiculously inefficient codec (i.e., JPEG).

So, try the following:
Add
#include <GroupsockHelper.hh>
to your application, and add the line
increaseReceiveBufferTo(env, scs.subsession->rtpSource()->RTPgs()->socketNum(), 2000000);
to your "continueAfterSETUP()" function.

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/20130729/d83532fa/attachment-0001.html>


More information about the live-devel mailing list