#include "MultiFramedRTPSource.hh"Include dependency graph for MPEG4LATMAudioRTPSource.hh:

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

Go to the source code of this file.
Data Structures | |
| class | MPEG4LATMAudioRTPSource |
Functions | |
| Boolean | parseStreamMuxConfigStr (char const *configStr, Boolean &audioMuxVersion, Boolean &allStreamsSameTimeFraming, unsigned char &numSubFrames, unsigned char &numProgram, unsigned char &numLayer, unsigned char *&audioSpecificConfig, unsigned &audioSpecificConfigSize) |
| unsigned char * | parseStreamMuxConfigStr (char const *configStr, unsigned &audioSpecificConfigSize) |
| unsigned char * | parseGeneralConfigStr (char const *configStr, unsigned &configSize) |
| unsigned char* parseGeneralConfigStr | ( | char const * | configStr, | |
| unsigned & | configSize | |||
| ) |
Definition at line 241 of file MPEG4LATMAudioRTPSource.cpp.
References getByte(), and NULL.
Referenced by QuickTimeFileSink::addAtom_hdlr2(), MPEG4ESVideoRTPSink::MPEG4ESVideoRTPSink(), samplingFrequencyFromAudioSpecificConfig(), MPEG4VideoStreamFramer::setConfigInfo(), and setupStreams().
00242 : 00243 unsigned& configSize) { 00244 unsigned char* config = NULL; 00245 do { 00246 if (configStr == NULL) break; 00247 configSize = (strlen(configStr)+1)/2; 00248 00249 config = new unsigned char[configSize]; 00250 if (config == NULL) break; 00251 00252 unsigned i; 00253 for (i = 0; i < configSize; ++i) { 00254 if (!getByte(configStr, config[i])) break; 00255 } 00256 if (i != configSize) break; // part of the string was bad 00257 00258 return config; 00259 } while (0); 00260 00261 configSize = 0; 00262 delete[] config; 00263 return NULL; 00264 } }
| unsigned char* parseStreamMuxConfigStr | ( | char const * | configStr, | |
| unsigned & | audioSpecificConfigSize | |||
| ) |
Definition at line 223 of file MPEG4LATMAudioRTPSource.cpp.
References NULL, and parseStreamMuxConfigStr().
00224 : 00225 unsigned& audioSpecificConfigSize) { 00226 Boolean audioMuxVersion, allStreamsSameTimeFraming; 00227 unsigned char numSubFrames, numProgram, numLayer; 00228 unsigned char* audioSpecificConfig; 00229 00230 if (!parseStreamMuxConfigStr(configStr, 00231 audioMuxVersion, allStreamsSameTimeFraming, 00232 numSubFrames, numProgram, numLayer, 00233 audioSpecificConfig, audioSpecificConfigSize)) { 00234 audioSpecificConfigSize = 0; 00235 return NULL; 00236 } 00237 00238 return audioSpecificConfig; 00239 }
| Boolean parseStreamMuxConfigStr | ( | char const * | configStr, | |
| Boolean & | audioMuxVersion, | |||
| Boolean & | allStreamsSameTimeFraming, | |||
| unsigned char & | numSubFrames, | |||
| unsigned char & | numProgram, | |||
| unsigned char & | numLayer, | |||
| unsigned char *& | audioSpecificConfig, | |||
| unsigned & | audioSpecificConfigSize | |||
| ) |
Definition at line 165 of file MPEG4LATMAudioRTPSource.cpp.
Referenced by parseStreamMuxConfigStr().
00166 : 00167 Boolean& audioMuxVersion, 00168 Boolean& allStreamsSameTimeFraming, 00169 unsigned char& numSubFrames, 00170 unsigned char& numProgram, 00171 unsigned char& numLayer, 00172 unsigned char*& audioSpecificConfig, 00173 unsigned& audioSpecificConfigSize) { 00174 // Set default versions of the result parameters: 00175 audioMuxVersion = 0; 00176 allStreamsSameTimeFraming = 1; 00177 numSubFrames = numProgram = numLayer = 0; 00178 audioSpecificConfig = NULL; 00179 audioSpecificConfigSize = 0; 00180 00181 do { 00182 if (configStr == NULL) break; 00183 00184 unsigned char nextByte; 00185 00186 if (!getByte(configStr, nextByte)) break; 00187 audioMuxVersion = (nextByte&0x80)>>7; 00188 if (audioMuxVersion != 0) break; 00189 00190 allStreamsSameTimeFraming = (nextByte&0x40)>>6; 00191 numSubFrames = (nextByte&0x3F); 00192 00193 if (!getByte(configStr, nextByte)) break; 00194 numProgram = (nextByte&0xF0)>>4; 00195 00196 numLayer = (nextByte&0x0E)>>1; 00197 00198 // The one remaining bit, and the rest of the string, 00199 // are used for "audioSpecificConfig": 00200 unsigned char remainingBit = nextByte&1; 00201 00202 unsigned ascSize = (strlen(configStr)+1)/2 + 1; 00203 audioSpecificConfig = new unsigned char[ascSize]; 00204 00205 Boolean parseSuccess; 00206 unsigned i = 0; 00207 do { 00208 nextByte = 0; 00209 parseSuccess = getByte(configStr, nextByte); 00210 audioSpecificConfig[i++] = (remainingBit<<7)|((nextByte&0xFE)>>1); 00211 remainingBit = nextByte&1; 00212 } while (parseSuccess); 00213 if (i != ascSize) break; // part of the remaining string was bad 00214 00215 audioSpecificConfigSize = ascSize; 00216 return True; // parsing succeeded 00217 } while (0); 00218 00219 delete[] audioSpecificConfig; 00220 return False; // parsing failed 00221 }
1.5.2