liveMedia/include/H264VideoRTPSource.hh File Reference

#include "MultiFramedRTPSource.hh"

Include dependency graph for H264VideoRTPSource.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

class  H264VideoRTPSource
class  SPropRecord

Functions

SPropRecordparseSPropParameterSets (char const *sPropParameterSetsStr, unsigned &numSPropRecords)


Function Documentation

SPropRecord* parseSPropParameterSets ( char const *  sPropParameterSetsStr,
unsigned &  numSPropRecords 
)

Definition at line 119 of file H264VideoRTPSource.cpp.

References base64Decode(), NULL, and strDup().

Referenced by H264or5VideoFileSink::afterGettingFrame(), H264VideoRTPSink::createNew(), and H265VideoRTPSink::createNew().

00120                                                         :
00121                                      unsigned& numSPropRecords) {
00122   // Make a copy of the input string, so we can replace the commas with '\0's:
00123   char* inStr = strDup(sPropParameterSetsStr);
00124   if (inStr == NULL) {
00125     numSPropRecords = 0;
00126     return NULL;
00127   }
00128 
00129   // Count the number of commas (and thus the number of parameter sets):
00130   numSPropRecords = 1;
00131   char* s;
00132   for (s = inStr; *s != '\0'; ++s) {
00133     if (*s == ',') {
00134       ++numSPropRecords;
00135       *s = '\0';
00136     }
00137   }
00138 
00139   // Allocate and fill in the result array:
00140   SPropRecord* resultArray = new SPropRecord[numSPropRecords];
00141   s = inStr;
00142   for (unsigned i = 0; i < numSPropRecords; ++i) {
00143     resultArray[i].sPropBytes = base64Decode(s, resultArray[i].sPropLength);
00144     s += strlen(s) + 1;
00145   }
00146 
00147   delete[] inStr;
00148   return resultArray;
00149 }


Generated on Tue Mar 25 14:36:45 2014 for live by  doxygen 1.5.2