[Live-devel] modifying client end of ProxyServer

srimugunth at csa.iisc.ernet.in srimugunth at csa.iisc.ernet.in
Tue Sep 3 11:37:02 PDT 2013


Hi,

In the proxyserver implementation i want to dump the frames after i got it
from the client and before it is given to the server. (I do this as a
first step to integrate our transcoder between RTSP client and RTSP
server)

With testRTSPClient.cpp, i was able to add the following code to
DummySink::afterGettingFrame() and successfully dump .h264 frames


	"
   unsigned char const start_code[4] = {0x00, 0x00, 0x00, 0x01};
   if(strcmp(fSubsession.mediumName(),"video") == 0)
   {

 	if (!fHaveWrittenFirstFrame_dummy) {
	/* If we have PPS/SPS NAL units encoded in a "sprop parameter    
string", prepend these to the file:
   */
	unsigned numSPropRecords;
	const char* fSPropParameterSetsStr = fSubsession.fmtp_spropparametersets();

	SPropRecord* sPropRecords =
parseSPropParameterSets(fSPropParameterSetsStr, numSPropRecords);

	for (unsigned i = 0; i < numSPropRecords; ++i) {
	  fwrite(start_code, 1, 4, outFP);
  	  fwrite(sPropRecords[i].sPropBytes, 1, sPropRecords[i].sPropLength,
outFP);
	}
	delete[] sPropRecords;
	fHaveWrittenFirstFrame_dummy = True; // for next time
	}


	fwrite(start_code, 1, 4, outFP);
	fwrite(this->fReceiveBuffer,sizeof(char),frameSize,outFP);
    }
    "


So I tried to add the same code in ProxyServerMediaSession.cpp. There is a
afterGettingFrame as part of PresentationTimeSubsessionNormalizer.
Is this the correct place to modify to dump frames from Client.

Also in PresentationTimeSubsessionNormalizer class i am not able to call
fSubsession.fmtp_spropparametersets();
How will i get SPS+PPS info?

-mugunthan


-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.



More information about the live-devel mailing list