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

Defines

#define SPECIAL_HEADER_BUFFER_SIZE   1000

Functions

SPropRecordparseSPropParameterSets (char const *sPropParameterSetsStr, unsigned &numSPropRecords)


Define Documentation

#define SPECIAL_HEADER_BUFFER_SIZE   1000

Definition at line 28 of file H264VideoRTPSource.hh.


Function Documentation

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 }


Generated on Fri Dec 19 21:58:40 2008 for live by  doxygen 1.5.2