[Live-devel] question about parseSPropParameterSets()

Ross Finlayson finlayson at live555.com
Mon Jan 30 21:52:01 PST 2012


G'day James, it's nice to hear from another University of Auckland person.


> I have a question about parseSPropParameterSets() function.
> 
> Based on my understanding, I think this function will read in the SPS and PPS data,

Yes, it will read in a coded ASCII string that represents the SPS and PPS NAL units.


> then do base64 decode to generate a nal unit.
> 
> I have fit the SPS and PPS data by using this 
> 
> 
> unsigned int num=0;  
> 
> SPropRecord * sps=parseSPropParameterSets(context->subsession->fmtp_spropparametersets(),num);
> 
After the call, "sps" will be an array of "num" "SPropRecord"s - each one containing the data for a NAL unit (usually SPS or PPS).  So you can do, for example:

	for (unsigned i = 0; i < num; ++i) {
		unsigned nalUnitSize = sps[i].sPropLength;
		unsigned char* nalUnitBytes = sps[i].sPropBytes;  // this is a byte array, of size "nalUnitSize".
		// Then do whatever you like with this NAL unit data
	}


> My question is how can i store 
> 
>  SPropRecord * data to a NSData and send into extradata to decode?

I don't know what a "NSData" is (it's apparently something outside our libraries), but I hope it should be obvious from the implementation of the function in "liveMedia/H264VideoRTPSource.cpp" how it works.


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/20120130/7ad2d861/attachment.html>


More information about the live-devel mailing list