|
From: Robert J. <rjo...@us...> - 2007-09-10 00:16:14
|
Update of /cvsroot/openh323/opal/src/opal In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv26651 Modified Files: mediafmt.cxx Log Message: Fixed allocating dynamic payload types to media formats maked as internal via having an IllegalPayloadType Added extra fields to the PrintOptions() function. Index: mediafmt.cxx =================================================================== RCS file: /cvsroot/openh323/opal/src/opal/mediafmt.cxx,v retrieving revision 2.72 retrieving revision 2.73 diff -C2 -d -r2.72 -r2.73 *** mediafmt.cxx 7 Sep 2007 05:40:12 -0000 2.72 --- mediafmt.cxx 10 Sep 2007 00:16:16 -0000 2.73 *************** *** 25,28 **** --- 25,33 ---- * * $Log$ + * Revision 2.73 2007/09/10 00:16:16 rjongbloed + * Fixed allocating dynamic payload types to media formats maked as internal via + * having an IllegalPayloadType + * Added extra fields to the PrintOptions() function. + * * Revision 2.72 2007/09/07 05:40:12 rjongbloed * Fixed issue where OpalMediaOptions are lost when an OpalMediaFormat *************** *** 912,916 **** // assume non-dynamic payload types are correct and do not need deconflicting ! if (rtpPayloadType < RTP_DataFrame::DynamicBase || rtpPayloadType == RTP_DataFrame::MaxPayloadType) { registeredFormats.OpalMediaFormatBaseList::Append(this); return; --- 917,921 ---- // assume non-dynamic payload types are correct and do not need deconflicting ! if (rtpPayloadType < RTP_DataFrame::DynamicBase || rtpPayloadType >= RTP_DataFrame::MaxPayloadType) { registeredFormats.OpalMediaFormatBaseList::Append(this); return; *************** *** 1311,1317 **** ostream & OpalMediaFormat::PrintOptions(ostream & strm) const { for (PINDEX i = 0; i < GetOptionCount(); i++) { const OpalMediaOption & option = GetOption(i); ! strm << right << setw(25) << option.GetName() << " (R/" << (option.IsReadOnly() ? 'O' : 'W') << ") = " << left << setw(10) << option.AsString(); if (!option.GetFMTPName().IsEmpty()) --- 1316,1329 ---- ostream & OpalMediaFormat::PrintOptions(ostream & strm) const { + static const char * const SessionNames[] = { "", " Audio", " Video", " Data", " H.224" }; + static const int TitleWidth = 25; + + strm << right << setw(TitleWidth) << "Format Name" << left << " = " << *this << '\n' + << right << setw(TitleWidth) << "Session ID" << left << " = " << defaultSessionID << (defaultSessionID < PARRAYSIZE(SessionNames) ? SessionNames[defaultSessionID] : "") << '\n' + << right << setw(TitleWidth) << "Payload Type" << left << " = " << rtpPayloadType << '\n' + << right << setw(TitleWidth) << "Encoding Name" << left << " = " << rtpEncodingName << '\n'; for (PINDEX i = 0; i < GetOptionCount(); i++) { const OpalMediaOption & option = GetOption(i); ! strm << right << setw(TitleWidth) << option.GetName() << " (R/" << (option.IsReadOnly() ? 'O' : 'W') << ") = " << left << setw(10) << option.AsString(); if (!option.GetFMTPName().IsEmpty()) *************** *** 1328,1332 **** strm << " RM"; } ! strm << endl; } strm << endl; --- 1340,1344 ---- strm << " RM"; } ! strm << '\n'; } strm << endl; |