#include "H264VideoRTPSource.hh"#include "Base64.hh"Include dependency graph for H264VideoRTPSource.cpp:

Go to the source code of this file.
Data Structures | |
| class | H264BufferedPacket |
| class | H264BufferedPacketFactory |
Functions | |
| SPropRecord * | parseSPropParameterSets (char const *sPropParameterSetsStr, unsigned &numSPropRecords) |
| SPropRecord* parseSPropParameterSets | ( | char const * | sPropParameterSetsStr, | |
| unsigned & | numSPropRecords | |||
| ) |
Definition at line 122 of file H264VideoRTPSource.cpp.
References base64Decode(), NULL, and strDup().
00123 : 00124 unsigned& numSPropRecords) { 00125 // Make a copy of the input string, so we can replace the commas with '\0's: 00126 char* inStr = strDup(sPropParameterSetsStr); 00127 if (inStr == NULL) { 00128 numSPropRecords = 0; 00129 return NULL; 00130 } 00131 00132 // Count the number of commas (and thus the number of parameter sets): 00133 numSPropRecords = 1; 00134 char* s; 00135 for (s = inStr; *s != '\0'; ++s) { 00136 if (*s == ',') { 00137 ++numSPropRecords; 00138 *s = '\0'; 00139 } 00140 } 00141 00142 // Allocate and fill in the result array: 00143 SPropRecord* resultArray = new SPropRecord[numSPropRecords]; 00144 s = inStr; 00145 for (unsigned i = 0; i < numSPropRecords; ++i) { 00146 resultArray[i].sPropBytes = base64Decode(s, resultArray[i].sPropLength); 00147 s += strlen(s) + 1; 00148 } 00149 00150 delete[] inStr; 00151 return resultArray; 00152 }
1.5.2