00001
00002
00003
00004
00005
00006
00007 #include <ptlib.h>
00008 #include "h245.h"
00009
00010 #define new PNEW
00011
00012
00013 #if ! H323_DISABLE_H245
00014
00015
00016
00017
00018
00019 H245_ArrayOf_CustomPictureFormat::H245_ArrayOf_CustomPictureFormat(unsigned tag, PASN_Object::TagClass tagClass)
00020 : PASN_Array(tag, tagClass)
00021 {
00022 }
00023
00024
00025 PASN_Object * H245_ArrayOf_CustomPictureFormat::CreateObject() const
00026 {
00027 return new H245_CustomPictureFormat;
00028 }
00029
00030
00031 H245_CustomPictureFormat & H245_ArrayOf_CustomPictureFormat::operator[](PINDEX i) const
00032 {
00033 return (H245_CustomPictureFormat &)array[i];
00034 }
00035
00036
00037 PObject * H245_ArrayOf_CustomPictureFormat::Clone() const
00038 {
00039 #ifndef PASN_LEANANDMEAN
00040 PAssert(IsClass(H245_ArrayOf_CustomPictureFormat::Class()), PInvalidCast);
00041 #endif
00042 return new H245_ArrayOf_CustomPictureFormat(*this);
00043 }
00044
00045
00046
00047
00048
00049
00050 H245_ArrayOf_H263VideoModeCombos::H245_ArrayOf_H263VideoModeCombos(unsigned tag, PASN_Object::TagClass tagClass)
00051 : PASN_Array(tag, tagClass)
00052 {
00053 }
00054
00055
00056 PASN_Object * H245_ArrayOf_H263VideoModeCombos::CreateObject() const
00057 {
00058 return new H245_H263VideoModeCombos;
00059 }
00060
00061
00062 H245_H263VideoModeCombos & H245_ArrayOf_H263VideoModeCombos::operator[](PINDEX i) const
00063 {
00064 return (H245_H263VideoModeCombos &)array[i];
00065 }
00066
00067
00068 PObject * H245_ArrayOf_H263VideoModeCombos::Clone() const
00069 {
00070 #ifndef PASN_LEANANDMEAN
00071 PAssert(IsClass(H245_ArrayOf_H263VideoModeCombos::Class()), PInvalidCast);
00072 #endif
00073 return new H245_ArrayOf_H263VideoModeCombos(*this);
00074 }
00075
00076
00077
00078
00079
00080
00081 H245_RefPictureSelection_additionalPictureMemory::H245_RefPictureSelection_additionalPictureMemory(unsigned tag, PASN_Object::TagClass tagClass)
00082 : PASN_Sequence(tag, tagClass, 6, TRUE, 0)
00083 {
00084 m_sqcifAdditionalPictureMemory.SetConstraints(PASN_Object::FixedConstraint, 1, 256);
00085 m_qcifAdditionalPictureMemory.SetConstraints(PASN_Object::FixedConstraint, 1, 256);
00086 m_cifAdditionalPictureMemory.SetConstraints(PASN_Object::FixedConstraint, 1, 256);
00087 m_cif4AdditionalPictureMemory.SetConstraints(PASN_Object::FixedConstraint, 1, 256);
00088 m_cif16AdditionalPictureMemory.SetConstraints(PASN_Object::FixedConstraint, 1, 256);
00089 m_bigCpfAdditionalPictureMemory.SetConstraints(PASN_Object::FixedConstraint, 1, 256);
00090 }
00091
00092
00093 #ifndef PASN_NOPRINTON
00094 void H245_RefPictureSelection_additionalPictureMemory::PrintOn(ostream & strm) const
00095 {
00096 int indent = strm.precision() + 2;
00097 strm << "{\n";
00098 if (HasOptionalField(e_sqcifAdditionalPictureMemory))
00099 strm << setw(indent+31) << "sqcifAdditionalPictureMemory = " << setprecision(indent) << m_sqcifAdditionalPictureMemory << '\n';
00100 if (HasOptionalField(e_qcifAdditionalPictureMemory))
00101 strm << setw(indent+30) << "qcifAdditionalPictureMemory = " << setprecision(indent) << m_qcifAdditionalPictureMemory << '\n';
00102 if (HasOptionalField(e_cifAdditionalPictureMemory))
00103 strm << setw(indent+29) << "cifAdditionalPictureMemory = " << setprecision(indent) << m_cifAdditionalPictureMemory << '\n';
00104 if (HasOptionalField(e_cif4AdditionalPictureMemory))
00105 strm << setw(indent+30) << "cif4AdditionalPictureMemory = " << setprecision(indent) << m_cif4AdditionalPictureMemory << '\n';
00106 if (HasOptionalField(e_cif16AdditionalPictureMemory))
00107 strm << setw(indent+31) << "cif16AdditionalPictureMemory = " << setprecision(indent) << m_cif16AdditionalPictureMemory << '\n';
00108 if (HasOptionalField(e_bigCpfAdditionalPictureMemory))
00109 strm << setw(indent+32) << "bigCpfAdditionalPictureMemory = " << setprecision(indent) << m_bigCpfAdditionalPictureMemory << '\n';
00110 strm << setw(indent-1) << setprecision(indent-2) << "}";
00111 }
00112 #endif
00113
00114
00115 PObject::Comparison H245_RefPictureSelection_additionalPictureMemory::Compare(const PObject & obj) const
00116 {
00117 #ifndef PASN_LEANANDMEAN
00118 PAssert(PIsDescendant(&obj, H245_RefPictureSelection_additionalPictureMemory), PInvalidCast);
00119 #endif
00120 const H245_RefPictureSelection_additionalPictureMemory & other = (const H245_RefPictureSelection_additionalPictureMemory &)obj;
00121
00122 Comparison result;
00123
00124 if ((result = m_sqcifAdditionalPictureMemory.Compare(other.m_sqcifAdditionalPictureMemory)) != EqualTo)
00125 return result;
00126 if ((result = m_qcifAdditionalPictureMemory.Compare(other.m_qcifAdditionalPictureMemory)) != EqualTo)
00127 return result;
00128 if ((result = m_cifAdditionalPictureMemory.Compare(other.m_cifAdditionalPictureMemory)) != EqualTo)
00129 return result;
00130 if ((result = m_cif4AdditionalPictureMemory.Compare(other.m_cif4AdditionalPictureMemory)) != EqualTo)
00131 return result;
00132 if ((result = m_cif16AdditionalPictureMemory.Compare(other.m_cif16AdditionalPictureMemory)) != EqualTo)
00133 return result;
00134 if ((result = m_bigCpfAdditionalPictureMemory.Compare(other.m_bigCpfAdditionalPictureMemory)) != EqualTo)
00135 return result;
00136
00137 return PASN_Sequence::Compare(other);
00138 }
00139
00140
00141 PINDEX H245_RefPictureSelection_additionalPictureMemory::GetDataLength() const
00142 {
00143 PINDEX length = 0;
00144 if (HasOptionalField(e_sqcifAdditionalPictureMemory))
00145 length += m_sqcifAdditionalPictureMemory.GetObjectLength();
00146 if (HasOptionalField(e_qcifAdditionalPictureMemory))
00147 length += m_qcifAdditionalPictureMemory.GetObjectLength();
00148 if (HasOptionalField(e_cifAdditionalPictureMemory))
00149 length += m_cifAdditionalPictureMemory.GetObjectLength();
00150 if (HasOptionalField(e_cif4AdditionalPictureMemory))
00151 length += m_cif4AdditionalPictureMemory.GetObjectLength();
00152 if (HasOptionalField(e_cif16AdditionalPictureMemory))
00153 length += m_cif16AdditionalPictureMemory.GetObjectLength();
00154 if (HasOptionalField(e_bigCpfAdditionalPictureMemory))
00155 length += m_bigCpfAdditionalPictureMemory.GetObjectLength();
00156 return length;
00157 }
00158
00159
00160 BOOL H245_RefPictureSelection_additionalPictureMemory::Decode(PASN_Stream & strm)
00161 {
00162 if (!PreambleDecode(strm))
00163 return FALSE;
00164
00165 if (HasOptionalField(e_sqcifAdditionalPictureMemory) && !m_sqcifAdditionalPictureMemory.Decode(strm))
00166 return FALSE;
00167 if (HasOptionalField(e_qcifAdditionalPictureMemory) && !m_qcifAdditionalPictureMemory.Decode(strm))
00168 return FALSE;
00169 if (HasOptionalField(e_cifAdditionalPictureMemory) && !m_cifAdditionalPictureMemory.Decode(strm))
00170 return FALSE;
00171 if (HasOptionalField(e_cif4AdditionalPictureMemory) && !m_cif4AdditionalPictureMemory.Decode(strm))
00172 return FALSE;
00173 if (HasOptionalField(e_cif16AdditionalPictureMemory) && !m_cif16AdditionalPictureMemory.Decode(strm))
00174 return FALSE;
00175 if (HasOptionalField(e_bigCpfAdditionalPictureMemory) && !m_bigCpfAdditionalPictureMemory.Decode(strm))
00176 return FALSE;
00177
00178 return UnknownExtensionsDecode(strm);
00179 }
00180
00181
00182 void H245_RefPictureSelection_additionalPictureMemory::Encode(PASN_Stream & strm) const
00183 {
00184 PreambleEncode(strm);
00185
00186 if (HasOptionalField(e_sqcifAdditionalPictureMemory))
00187 m_sqcifAdditionalPictureMemory.Encode(strm);
00188 if (HasOptionalField(e_qcifAdditionalPictureMemory))
00189 m_qcifAdditionalPictureMemory.Encode(strm);
00190 if (HasOptionalField(e_cifAdditionalPictureMemory))
00191 m_cifAdditionalPictureMemory.Encode(strm);
00192 if (HasOptionalField(e_cif4AdditionalPictureMemory))
00193 m_cif4AdditionalPictureMemory.Encode(strm);
00194 if (HasOptionalField(e_cif16AdditionalPictureMemory))
00195 m_cif16AdditionalPictureMemory.Encode(strm);
00196 if (HasOptionalField(e_bigCpfAdditionalPictureMemory))
00197 m_bigCpfAdditionalPictureMemory.Encode(strm);
00198
00199 UnknownExtensionsEncode(strm);
00200 }
00201
00202
00203 PObject * H245_RefPictureSelection_additionalPictureMemory::Clone() const
00204 {
00205 #ifndef PASN_LEANANDMEAN
00206 PAssert(IsClass(H245_RefPictureSelection_additionalPictureMemory::Class()), PInvalidCast);
00207 #endif
00208 return new H245_RefPictureSelection_additionalPictureMemory(*this);
00209 }
00210
00211
00212
00213 #ifndef PASN_NOPRINTON
00214 const static PASN_Names Names_H245_RefPictureSelection_videoBackChannelSend[]={
00215 {"none",0}
00216 ,{"ackMessageOnly",1}
00217 ,{"nackMessageOnly",2}
00218 ,{"ackOrNackMessageOnly",3}
00219 ,{"ackAndNackMessage",4}
00220 };
00221 #endif
00222
00223
00224
00225
00226 H245_RefPictureSelection_videoBackChannelSend::H245_RefPictureSelection_videoBackChannelSend(unsigned tag, PASN_Object::TagClass tagClass)
00227 : PASN_Choice(tag, tagClass, 5, TRUE
00228 #ifndef PASN_NOPRINTON
00229 ,(const PASN_Names *)Names_H245_RefPictureSelection_videoBackChannelSend,5
00230 #endif
00231 )
00232 {
00233 }
00234
00235
00236 BOOL H245_RefPictureSelection_videoBackChannelSend::CreateObject()
00237 {
00238 choice = (tag <= e_ackAndNackMessage) ? new PASN_Null() : NULL;
00239 return choice != NULL;
00240 }
00241
00242
00243 PObject * H245_RefPictureSelection_videoBackChannelSend::Clone() const
00244 {
00245 #ifndef PASN_LEANANDMEAN
00246 PAssert(IsClass(H245_RefPictureSelection_videoBackChannelSend::Class()), PInvalidCast);
00247 #endif
00248 return new H245_RefPictureSelection_videoBackChannelSend(*this);
00249 }
00250
00251
00252
00253 #ifndef PASN_NOPRINTON
00254 const static PASN_Names Names_H245_CustomPictureFormat_pixelAspectInformation[]={
00255 {"anyPixelAspectRatio",0}
00256 ,{"pixelAspectCode",1}
00257 ,{"extendedPAR",2}
00258 };
00259 #endif
00260
00261
00262
00263
00264 H245_CustomPictureFormat_pixelAspectInformation::H245_CustomPictureFormat_pixelAspectInformation(unsigned tag, PASN_Object::TagClass tagClass)
00265 : PASN_Choice(tag, tagClass, 3, TRUE
00266 #ifndef PASN_NOPRINTON
00267 ,(const PASN_Names *)Names_H245_CustomPictureFormat_pixelAspectInformation,3
00268 #endif
00269 )
00270 {
00271 }
00272
00273
00274 #if defined(__GNUC__) && __GNUC__ <= 2 && __GNUC_MINOR__ < 9
00275 H245_CustomPictureFormat_pixelAspectInformation::operator H245_CustomPictureFormat_pixelAspectInformation_pixelAspectCode &() const
00276 #else
00277 H245_CustomPictureFormat_pixelAspectInformation::operator H245_CustomPictureFormat_pixelAspectInformation_pixelAspectCode &()
00278 {
00279 #ifndef PASN_LEANANDMEAN
00280 PAssert(PIsDescendant(PAssertNULL(choice), H245_CustomPictureFormat_pixelAspectInformation_pixelAspectCode), PInvalidCast);
00281 #endif
00282 return *(H245_CustomPictureFormat_pixelAspectInformation_pixelAspectCode *)choice;
00283 }
00284
00285
00286 H245_CustomPictureFormat_pixelAspectInformation::operator const H245_CustomPictureFormat_pixelAspectInformation_pixelAspectCode &() const
00287 #endif
00288 {
00289 #ifndef PASN_LEANANDMEAN
00290 PAssert(PIsDescendant(PAssertNULL(choice), H245_CustomPictureFormat_pixelAspectInformation_pixelAspectCode), PInvalidCast);
00291 #endif
00292 return *(H245_CustomPictureFormat_pixelAspectInformation_pixelAspectCode *)choice;
00293 }
00294
00295
00296 #if defined(__GNUC__) && __GNUC__ <= 2 && __GNUC_MINOR__ < 9
00297 H245_CustomPictureFormat_pixelAspectInformation::operator H245_CustomPictureFormat_pixelAspectInformation_extendedPAR &() const
00298 #else
00299 H245_CustomPictureFormat_pixelAspectInformation::operator H245_CustomPictureFormat_pixelAspectInformation_extendedPAR &()
00300 {
00301 #ifndef PASN_LEANANDMEAN
00302 PAssert(PIsDescendant(PAssertNULL(choice), H245_CustomPictureFormat_pixelAspectInformation_extendedPAR), PInvalidCast);
00303 #endif
00304 return *(H245_CustomPictureFormat_pixelAspectInformation_extendedPAR *)choice;
00305 }
00306
00307
00308 H245_CustomPictureFormat_pixelAspectInformation::operator const H245_CustomPictureFormat_pixelAspectInformation_extendedPAR &() const
00309 #endif
00310 {
00311 #ifndef PASN_LEANANDMEAN
00312 PAssert(PIsDescendant(PAssertNULL(choice), H245_CustomPictureFormat_pixelAspectInformation_extendedPAR), PInvalidCast);
00313 #endif
00314 return *(H245_CustomPictureFormat_pixelAspectInformation_extendedPAR *)choice;
00315 }
00316
00317
00318 BOOL H245_CustomPictureFormat_pixelAspectInformation::CreateObject()
00319 {
00320 switch (tag) {
00321 case e_anyPixelAspectRatio :
00322 choice = new PASN_Boolean();
00323 return TRUE;
00324 case e_pixelAspectCode :
00325 choice = new H245_CustomPictureFormat_pixelAspectInformation_pixelAspectCode();
00326 return TRUE;
00327 case e_extendedPAR :
00328 choice = new H245_CustomPictureFormat_pixelAspectInformation_extendedPAR();
00329 return TRUE;
00330 }
00331
00332 choice = NULL;
00333 return FALSE;
00334 }
00335
00336
00337 PObject * H245_CustomPictureFormat_pixelAspectInformation::Clone() const
00338 {
00339 #ifndef PASN_LEANANDMEAN
00340 PAssert(IsClass(H245_CustomPictureFormat_pixelAspectInformation::Class()), PInvalidCast);
00341 #endif
00342 return new H245_CustomPictureFormat_pixelAspectInformation(*this);
00343 }
00344
00345
00346
00347
00348
00349
00350 H245_ArrayOf_H263ModeComboFlags::H245_ArrayOf_H263ModeComboFlags(unsigned tag, PASN_Object::TagClass tagClass)
00351 : PASN_Array(tag, tagClass)
00352 {
00353 }
00354
00355
00356 PASN_Object * H245_ArrayOf_H263ModeComboFlags::CreateObject() const
00357 {
00358 return new H245_H263ModeComboFlags;
00359 }
00360
00361
00362 H245_H263ModeComboFlags & H245_ArrayOf_H263ModeComboFlags::operator[](PINDEX i) const
00363 {
00364 return (H245_H263ModeComboFlags &)array[i];
00365 }
00366
00367
00368 PObject * H245_ArrayOf_H263ModeComboFlags::Clone() const
00369 {
00370 #ifndef PASN_LEANANDMEAN
00371 PAssert(IsClass(H245_ArrayOf_H263ModeComboFlags::Class()), PInvalidCast);
00372 #endif
00373 return new H245_ArrayOf_H263ModeComboFlags(*this);
00374 }
00375
00376
00377
00378
00379
00380
00381 H245_AudioCapability_g7231::H245_AudioCapability_g7231(unsigned tag, PASN_Object::TagClass tagClass)
00382 : PASN_Sequence(tag, tagClass, 0, FALSE, 0)
00383 {
00384 m_maxAl_sduAudioFrames.SetConstraints(PASN_Object::FixedConstraint, 1, 256);
00385 }
00386
00387
00388 #ifndef PASN_NOPRINTON
00389 void H245_AudioCapability_g7231::PrintOn(ostream & strm) const
00390 {
00391 int indent = strm.precision() + 2;
00392 strm << "{\n";
00393 strm << setw(indent+23) << "maxAl_sduAudioFrames = " << setprecision(indent) << m_maxAl_sduAudioFrames << '\n';
00394 strm << setw(indent+21) << "silenceSuppression = " << setprecision(indent) << m_silenceSuppression << '\n';
00395 strm << setw(indent-1) << setprecision(indent-2) << "}";
00396 }
00397 #endif
00398
00399
00400 PObject::Comparison H245_AudioCapability_g7231::Compare(const PObject & obj) const
00401 {
00402 #ifndef PASN_LEANANDMEAN
00403 PAssert(PIsDescendant(&obj, H245_AudioCapability_g7231), PInvalidCast);
00404 #endif
00405 const H245_AudioCapability_g7231 & other = (const H245_AudioCapability_g7231 &)obj;
00406
00407 Comparison result;
00408
00409 if ((result = m_maxAl_sduAudioFrames.Compare(other.m_maxAl_sduAudioFrames)) != EqualTo)
00410 return result;
00411 if ((result = m_silenceSuppression.Compare(other.m_silenceSuppression)) != EqualTo)
00412 return result;
00413
00414 return PASN_Sequence::Compare(other);
00415 }
00416
00417
00418 PINDEX H245_AudioCapability_g7231::GetDataLength() const
00419 {
00420 PINDEX length = 0;
00421 length += m_maxAl_sduAudioFrames.GetObjectLength();
00422 length += m_silenceSuppression.GetObjectLength();
00423 return length;
00424 }
00425
00426
00427 BOOL H245_AudioCapability_g7231::Decode(PASN_Stream & strm)
00428 {
00429 if (!PreambleDecode(strm))
00430 return FALSE;
00431
00432 if (!m_maxAl_sduAudioFrames.Decode(strm))
00433 return FALSE;
00434 if (!m_silenceSuppression.Decode(strm))
00435 return FALSE;
00436
00437 return UnknownExtensionsDecode(strm);
00438 }
00439
00440
00441 void H245_AudioCapability_g7231::Encode(PASN_Stream & strm) const
00442 {
00443 PreambleEncode(strm);
00444
00445 m_maxAl_sduAudioFrames.Encode(strm);
00446 m_silenceSuppression.Encode(strm);
00447
00448 UnknownExtensionsEncode(strm);
00449 }
00450
00451
00452 PObject * H245_AudioCapability_g7231::Clone() const
00453 {
00454 #ifndef PASN_LEANANDMEAN
00455 PAssert(IsClass(H245_AudioCapability_g7231::Class()), PInvalidCast);
00456 #endif
00457 return new H245_AudioCapability_g7231(*this);
00458 }
00459
00460
00461
00462
00463
00464
00465 H245_G7231AnnexCCapability_g723AnnexCAudioMode::H245_G7231AnnexCCapability_g723AnnexCAudioMode(unsigned tag, PASN_Object::TagClass tagClass)
00466 : PASN_Sequence(tag, tagClass, 0, TRUE, 0)
00467 {
00468 m_highRateMode0.SetConstraints(PASN_Object::FixedConstraint, 27, 78);
00469 m_highRateMode1.SetConstraints(PASN_Object::FixedConstraint, 27, 78);
00470 m_lowRateMode0.SetConstraints(PASN_Object::FixedConstraint, 23, 66);
00471 m_lowRateMode1.SetConstraints(PASN_Object::FixedConstraint, 23, 66);
00472 m_sidMode0.SetConstraints(PASN_Object::FixedConstraint, 6, 17);
00473 m_sidMode1.SetConstraints(PASN_Object::FixedConstraint, 6, 17);
00474 }
00475
00476
00477 #ifndef PASN_NOPRINTON
00478 void H245_G7231AnnexCCapability_g723AnnexCAudioMode::PrintOn(ostream & strm) const
00479 {
00480 int indent = strm.precision() + 2;
00481 strm << "{\n";
00482 strm << setw(indent+16) << "highRateMode0 = " << setprecision(indent) << m_highRateMode0 << '\n';
00483 strm << setw(indent+16) << "highRateMode1 = " << setprecision(indent) << m_highRateMode1 << '\n';
00484 strm << setw(indent+15) << "lowRateMode0 = " << setprecision(indent) << m_lowRateMode0 << '\n';
00485 strm << setw(indent+15) << "lowRateMode1 = " << setprecision(indent) << m_lowRateMode1 << '\n';
00486 strm << setw(indent+11) << "sidMode0 = " << setprecision(indent) << m_sidMode0 << '\n';
00487 strm << setw(indent+11) << "sidMode1 = " << setprecision(indent) << m_sidMode1 << '\n';
00488 strm << setw(indent-1) << setprecision(indent-2) << "}";
00489 }
00490 #endif
00491
00492
00493 PObject::Comparison H245_G7231AnnexCCapability_g723AnnexCAudioMode::Compare(const PObject & obj) const
00494 {
00495 #ifndef PASN_LEANANDMEAN
00496 PAssert(PIsDescendant(&obj, H245_G7231AnnexCCapability_g723AnnexCAudioMode), PInvalidCast);
00497 #endif
00498 const H245_G7231AnnexCCapability_g723AnnexCAudioMode & other = (const H245_G7231AnnexCCapability_g723AnnexCAudioMode &)obj;
00499
00500 Comparison result;
00501
00502 if ((result = m_highRateMode0.Compare(other.m_highRateMode0)) != EqualTo)
00503 return result;
00504 if ((result = m_highRateMode1.Compare(other.m_highRateMode1)) != EqualTo)
00505 return result;
00506 if ((result = m_lowRateMode0.Compare(other.m_lowRateMode0)) != EqualTo)
00507 return result;
00508 if ((result = m_lowRateMode1.Compare(other.m_lowRateMode1)) != EqualTo)
00509 return result;
00510 if ((result = m_sidMode0.Compare(other.m_sidMode0)) != EqualTo)
00511 return result;
00512 if ((result = m_sidMode1.Compare(other.m_sidMode1)) != EqualTo)
00513 return result;
00514
00515 return PASN_Sequence::Compare(other);
00516 }
00517
00518
00519 PINDEX H245_G7231AnnexCCapability_g723AnnexCAudioMode::GetDataLength() const
00520 {
00521 PINDEX length = 0;
00522 length += m_highRateMode0.GetObjectLength();
00523 length += m_highRateMode1.GetObjectLength();
00524 length += m_lowRateMode0.GetObjectLength();
00525 length += m_lowRateMode1.GetObjectLength();
00526 length += m_sidMode0.GetObjectLength();
00527 length += m_sidMode1.GetObjectLength();
00528 return length;
00529 }
00530
00531
00532 BOOL H245_G7231AnnexCCapability_g723AnnexCAudioMode::Decode(PASN_Stream & strm)
00533 {
00534 if (!PreambleDecode(strm))
00535 return FALSE;
00536
00537 if (!m_highRateMode0.Decode(strm))
00538 return FALSE;
00539 if (!m_highRateMode1.Decode(strm))
00540 return FALSE;
00541 if (!m_lowRateMode0.Decode(strm))
00542 return FALSE;
00543 if (!m_lowRateMode1.Decode(strm))
00544 return FALSE;
00545 if (!m_sidMode0.Decode(strm))
00546 return FALSE;
00547 if (!m_sidMode1.Decode(strm))
00548 return FALSE;
00549
00550 return UnknownExtensionsDecode(strm);
00551 }
00552
00553
00554 void H245_G7231AnnexCCapability_g723AnnexCAudioMode::Encode(PASN_Stream & strm) const
00555 {
00556 PreambleEncode(strm);
00557
00558 m_highRateMode0.Encode(strm);
00559 m_highRateMode1.Encode(strm);
00560 m_lowRateMode0.Encode(strm);
00561 m_lowRateMode1.Encode(strm);
00562 m_sidMode0.Encode(strm);
00563 m_sidMode1.Encode(strm);
00564
00565 UnknownExtensionsEncode(strm);
00566 }
00567
00568
00569 PObject * H245_G7231AnnexCCapability_g723AnnexCAudioMode::Clone() const
00570 {
00571 #ifndef PASN_LEANANDMEAN
00572 PAssert(IsClass(H245_G7231AnnexCCapability_g723AnnexCAudioMode::Class()), PInvalidCast);
00573 #endif
00574 return new H245_G7231AnnexCCapability_g723AnnexCAudioMode(*this);
00575 }
00576
00577
00578
00579 #ifndef PASN_NOPRINTON
00580 const static PASN_Names Names_H245_DataApplicationCapability_application[]={
00581 {"nonStandard",0}
00582 ,{"t120",1}
00583 ,{"dsm_cc",2}
00584 ,{"userData",3}
00585 ,{"t84",4}
00586 ,{"t434",5}
00587 ,{"h224",6}
00588 ,{"nlpid",7}
00589 ,{"dsvdControl",8}
00590 ,{"h222DataPartitioning",9}
00591 ,{"t30fax",10}
00592 ,{"t140",11}
00593 ,{"t38fax",12}
00594 ,{"genericDataCapability",13}
00595 };
00596 #endif
00597
00598
00599
00600
00601 H245_DataApplicationCapability_application::H245_DataApplicationCapability_application(unsigned tag, PASN_Object::TagClass tagClass)
00602 : PASN_Choice(tag, tagClass, 10, TRUE
00603 #ifndef PASN_NOPRINTON
00604 ,(const PASN_Names *)Names_H245_DataApplicationCapability_application,14
00605 #endif
00606 )
00607 {
00608 }
00609
00610
00611 #if defined(__GNUC__) && __GNUC__ <= 2 && __GNUC_MINOR__ < 9
00612 H245_DataApplicationCapability_application::operator H245_NonStandardParameter &() const
00613 #else
00614 H245_DataApplicationCapability_application::operator H245_NonStandardParameter &()
00615 {
00616 #ifndef PASN_LEANANDMEAN
00617 PAssert(PIsDescendant(PAssertNULL(choice), H245_NonStandardParameter), PInvalidCast);
00618 #endif
00619 return *(H245_NonStandardParameter *)choice;
00620 }
00621
00622
00623 H245_DataApplicationCapability_application::operator const H245_NonStandardParameter &() const
00624 #endif
00625 {
00626 #ifndef PASN_LEANANDMEAN
00627 PAssert(PIsDescendant(PAssertNULL(choice), H245_NonStandardParameter), PInvalidCast);
00628 #endif
00629 return *(H245_NonStandardParameter *)choice;
00630 }
00631
00632
00633 #if defined(__GNUC__) && __GNUC__ <= 2 && __GNUC_MINOR__ < 9
00634 H245_DataApplicationCapability_application::operator H245_DataProtocolCapability &() const
00635 #else
00636 H245_DataApplicationCapability_application::operator H245_DataProtocolCapability &()
00637 {
00638 #ifndef PASN_LEANANDMEAN
00639 PAssert(PIsDescendant(PAssertNULL(choice), H245_DataProtocolCapability), PInvalidCast);
00640 #endif
00641 return *(H245_DataProtocolCapability *)choice;
00642 }
00643
00644
00645 H245_DataApplicationCapability_application::operator const H245_DataProtocolCapability &() const
00646 #endif
00647 {
00648 #ifndef PASN_LEANANDMEAN
00649 PAssert(PIsDescendant(PAssertNULL(choice), H245_DataProtocolCapability), PInvalidCast);
00650 #endif
00651 return *(H245_DataProtocolCapability *)choice;
00652 }
00653
00654
00655 #if defined(__GNUC__) && __GNUC__ <= 2 && __GNUC_MINOR__ < 9
00656 H245_DataApplicationCapability_application::operator H245_DataApplicationCapability_application_t84 &() const
00657 #else
00658 H245_DataApplicationCapability_application::operator H245_DataApplicationCapability_application_t84 &()
00659 {
00660 #ifndef PASN_LEANANDMEAN
00661 PAssert(PIsDescendant(PAssertNULL(choice), H245_DataApplicationCapability_application_t84), PInvalidCast);
00662 #endif
00663 return *(H245_DataApplicationCapability_application_t84 *)choice;
00664 }
00665
00666
00667 H245_DataApplicationCapability_application::operator const H245_DataApplicationCapability_application_t84 &() const
00668 #endif
00669 {
00670 #ifndef PASN_LEANANDMEAN
00671 PAssert(PIsDescendant(PAssertNULL(choice), H245_DataApplicationCapability_application_t84), PInvalidCast);
00672 #endif
00673 return *(H245_DataApplicationCapability_application_t84 *)choice;
00674 }
00675
00676
00677 #if defined(__GNUC__) && __GNUC__ <= 2 && __GNUC_MINOR__ < 9
00678 H245_DataApplicationCapability_application::operator H245_DataApplicationCapability_application_nlpid &() const
00679 #else
00680 H245_DataApplicationCapability_application::operator H245_DataApplicationCapability_application_nlpid &()
00681 {
00682 #ifndef PASN_LEANANDMEAN
00683 PAssert(PIsDescendant(PAssertNULL(choice), H245_DataApplicationCapability_application_nlpid), PInvalidCast);
00684 #endif
00685 return *(H245_DataApplicationCapability_application_nlpid *)choice;
00686 }
00687
00688
00689 H245_DataApplicationCapability_application::operator const H245_DataApplicationCapability_application_nlpid &() const
00690 #endif
00691 {
00692 #ifndef PASN_LEANANDMEAN
00693 PAssert(PIsDescendant(PAssertNULL(choice), H245_DataApplicationCapability_application_nlpid), PInvalidCast);
00694 #endif
00695 return *(H245_DataApplicationCapability_application_nlpid *)choice;
00696 }
00697
00698
00699 #if defined(__GNUC__) && __GNUC__ <= 2 && __GNUC_MINOR__ < 9
00700 H245_DataApplicationCapability_application::operator H245_DataApplicationCapability_application_t38fax &() const
00701 #else
00702 H245_DataApplicationCapability_application::operator H245_DataApplicationCapability_application_t38fax &()
00703 {
00704 #ifndef PASN_LEANANDMEAN
00705 PAssert(PIsDescendant(PAssertNULL(choice), H245_DataApplicationCapability_application_t38fax), PInvalidCast);
00706 #endif
00707 return *(H245_DataApplicationCapability_application_t38fax *)choice;
00708 }
00709
00710
00711 H245_DataApplicationCapability_application::operator const H245_DataApplicationCapability_application_t38fax &() const
00712 #endif
00713 {
00714 #ifndef PASN_LEANANDMEAN
00715 PAssert(PIsDescendant(PAssertNULL(choice), H245_DataApplicationCapability_application_t38fax), PInvalidCast);
00716 #endif
00717 return *(H245_DataApplicationCapability_application_t38fax *)choice;
00718 }
00719
00720
00721 #if defined(__GNUC__) && __GNUC__ <= 2 && __GNUC_MINOR__ < 9
00722 H245_DataApplicationCapability_application::operator H245_GenericCapability &() const
00723 #else
00724 H245_DataApplicationCapability_application::operator H245_GenericCapability &()
00725 {
00726 #ifndef PASN_LEANANDMEAN
00727 PAssert(PIsDescendant(PAssertNULL(choice), H245_GenericCapability), PInvalidCast);
00728 #endif
00729 return *(H245_GenericCapability *)choice;
00730 }
00731
00732
00733 H245_DataApplicationCapability_application::operator const H245_GenericCapability &() const
00734 #endif
00735 {
00736 #ifndef PASN_LEANANDMEAN
00737 PAssert(PIsDescendant(PAssertNULL(choice), H245_GenericCapability), PInvalidCast);
00738 #endif
00739 return *(H245_GenericCapability *)choice;
00740 }
00741
00742
00743 BOOL H245_DataApplicationCapability_application::CreateObject()
00744 {
00745 switch (tag) {
00746 case e_nonStandard :
00747 choice = new H245_NonStandardParameter();
00748 return TRUE;
00749 case e_t120 :
00750 case e_dsm_cc :
00751 case e_userData :
00752 case e_t434 :
00753 case e_h224 :
00754 case e_h222DataPartitioning :
00755 case e_t30fax :
00756 case e_t140 :
00757 choice = new H245_DataProtocolCapability();
00758 return TRUE;
00759 case e_t84 :
00760 choice = new H245_DataApplicationCapability_application_t84();
00761 return TRUE;
00762 case e_nlpid :
00763 choice = new H245_DataApplicationCapability_application_nlpid();
00764 return TRUE;
00765 case e_dsvdControl :
00766 choice = new PASN_Null();
00767 return TRUE;
00768 case e_t38fax :
00769 choice = new H245_DataApplicationCapability_application_t38fax();
00770 return TRUE;
00771 case e_genericDataCapability :
00772 choice = new H245_GenericCapability();
00773 return TRUE;
00774 }
00775
00776 choice = NULL;
00777 return FALSE;
00778 }
00779
00780
00781 PObject * H245_DataApplicationCapability_application::Clone() const
00782 {
00783 #ifndef PASN_LEANANDMEAN
00784 PAssert(IsClass(H245_DataApplicationCapability_application::Class()), PInvalidCast);
00785 #endif
00786 return new H245_DataApplicationCapability_application(*this);
00787 }
00788
00789
00790
00791 #ifndef PASN_NOPRINTON
00792 const static PASN_Names Names_H245_DataProtocolCapability_v76wCompression[]={
00793 {"transmitCompression",0}
00794 ,{"receiveCompression",1}
00795 ,{"transmitAndReceiveCompression",2}
00796 };
00797 #endif
00798
00799
00800
00801
00802 H245_DataProtocolCapability_v76wCompression::H245_DataProtocolCapability_v76wCompression(unsigned tag, PASN_Object::TagClass tagClass)
00803 : PASN_Choice(tag, tagClass, 3, TRUE
00804 #ifndef PASN_NOPRINTON
00805 ,(const PASN_Names *)Names_H245_DataProtocolCapability_v76wCompression,3
00806 #endif
00807 )
00808 {
00809 }
00810
00811
00812 #if defined(__GNUC__) && __GNUC__ <= 2 && __GNUC_MINOR__ < 9
00813 H245_DataProtocolCapability_v76wCompression::operator H245_CompressionType &() const
00814 #else
00815 H245_DataProtocolCapability_v76wCompression::operator H245_CompressionType &()
00816 {
00817 #ifndef PASN_LEANANDMEAN
00818 PAssert(PIsDescendant(PAssertNULL(choice), H245_CompressionType), PInvalidCast);
00819 #endif
00820 return *(H245_CompressionType *)choice;
00821 }
00822
00823
00824 H245_DataProtocolCapability_v76wCompression::operator const H245_CompressionType &() const
00825 #endif
00826 {
00827 #ifndef PASN_LEANANDMEAN
00828 PAssert(PIsDescendant(PAssertNULL(choice), H245_CompressionType), PInvalidCast);
00829 #endif
00830 return *(H245_CompressionType *)choice;
00831 }
00832
00833
00834 BOOL H245_DataProtocolCapability_v76wCompression::CreateObject()
00835 {
00836 switch (tag) {
00837 case e_transmitCompression :
00838 case e_receiveCompression :
00839 case e_transmitAndReceiveCompression :
00840 choice = new H245_CompressionType();
00841 return TRUE;
00842 }
00843
00844 choice = NULL;
00845 return FALSE;
00846 }
00847
00848
00849 PObject * H245_DataProtocolCapability_v76wCompression::Clone() const
00850 {
00851 #ifndef PASN_LEANANDMEAN
00852 PAssert(IsClass(H245_DataProtocolCapability_v76wCompression::Class()), PInvalidCast);
00853 #endif
00854 return new H245_DataProtocolCapability_v76wCompression(*this);
00855 }
00856
00857
00858
00859
00860
00861
00862 H245_T84Profile_t84Restricted::H245_T84Profile_t84Restricted(unsigned tag, PASN_Object::TagClass tagClass)
00863 : PASN_Sequence(tag, tagClass, 0, TRUE, 0)
00864 {
00865 }
00866
00867
00868 #ifndef PASN_NOPRINTON
00869 void H245_T84Profile_t84Restricted::PrintOn(ostream & strm) const
00870 {
00871 int indent = strm.precision() + 2;
00872 strm << "{\n";
00873 strm << setw(indent+7) << "qcif = " << setprecision(indent) << m_qcif << '\n';
00874 strm << setw(indent+6) << "cif = " << setprecision(indent) << m_cif << '\n';
00875 strm << setw(indent+13) << "ccir601Seq = " << setprecision(indent) << m_ccir601Seq << '\n';
00876 strm << setw(indent+14) << "ccir601Prog = " << setprecision(indent) << m_ccir601Prog << '\n';
00877 strm << setw(indent+10) << "hdtvSeq = " << setprecision(indent) << m_hdtvSeq << '\n';
00878 strm << setw(indent+11) << "hdtvProg = " << setprecision(indent) << m_hdtvProg << '\n';
00879 strm << setw(indent+18) << "g3FacsMH200x100 = " << setprecision(indent) << m_g3FacsMH200x100 << '\n';
00880 strm << setw(indent+18) << "g3FacsMH200x200 = " << setprecision(indent) << m_g3FacsMH200x200 << '\n';
00881 strm << setw(indent+19) << "g4FacsMMR200x100 = " << setprecision(indent) << m_g4FacsMMR200x100 << '\n';
00882 strm << setw(indent+19) << "g4FacsMMR200x200 = " << setprecision(indent) << m_g4FacsMMR200x200 << '\n';
00883 strm << setw(indent+17) << "jbig200x200Seq = " << setprecision(indent) << m_jbig200x200Seq << '\n';
00884 strm << setw(indent+18) << "jbig200x200Prog = " << setprecision(indent) << m_jbig200x200Prog << '\n';
00885 strm << setw(indent+17) << "jbig300x300Seq = " << setprecision(indent) << m_jbig300x300Seq << '\n';
00886 strm << setw(indent+18) << "jbig300x300Prog = " << setprecision(indent) << m_jbig300x300Prog << '\n';
00887 strm << setw(indent+14) << "digPhotoLow = " << setprecision(indent) << m_digPhotoLow << '\n';
00888 strm << setw(indent+17) << "digPhotoMedSeq = " << setprecision(indent) << m_digPhotoMedSeq << '\n';
00889 strm << setw(indent+18) << "digPhotoMedProg = " << setprecision(indent) << m_digPhotoMedProg << '\n';
00890 strm << setw(indent+18) << "digPhotoHighSeq = " << setprecision(indent) << m_digPhotoHighSeq << '\n';
00891 strm << setw(indent+19) << "digPhotoHighProg = " << setprecision(indent) << m_digPhotoHighProg << '\n';
00892 strm << setw(indent-1) << setprecision(indent-2) << "}";
00893 }
00894 #endif
00895
00896
00897 PObject::Comparison H245_T84Profile_t84Restricted::Compare(const PObject & obj) const
00898 {
00899 #ifndef PASN_LEANANDMEAN
00900 PAssert(PIsDescendant(&obj, H245_T84Profile_t84Restricted), PInvalidCast);
00901 #endif
00902 const H245_T84Profile_t84Restricted & other = (const H245_T84Profile_t84Restricted &)obj;
00903
00904 Comparison result;
00905
00906 if ((result = m_qcif.Compare(other.m_qcif)) != EqualTo)
00907 return result;
00908 if ((result = m_cif.Compare(other.m_cif)) != EqualTo)
00909 return result;
00910 if ((result = m_ccir601Seq.Compare(other.m_ccir601Seq)) != EqualTo)
00911 return result;
00912 if ((result = m_ccir601Prog.Compare(other.m_ccir601Prog)) != EqualTo)
00913 return result;
00914 if ((result = m_hdtvSeq.Compare(other.m_hdtvSeq)) != EqualTo)
00915 return result;
00916 if ((result = m_hdtvProg.Compare(other.m_hdtvProg)) != EqualTo)
00917 return result;
00918 if ((result = m_g3FacsMH200x100.Compare(other.m_g3FacsMH200x100)) != EqualTo)
00919 return result;
00920 if ((result = m_g3FacsMH200x200.Compare(other.m_g3FacsMH200x200)) != EqualTo)
00921 return result;
00922 if ((result = m_g4FacsMMR200x100.Compare(other.m_g4FacsMMR200x100)) != EqualTo)
00923 return result;
00924 if ((result = m_g4FacsMMR200x200.Compare(other.m_g4FacsMMR200x200)) != EqualTo)
00925 return result;
00926 if ((result = m_jbig200x200Seq.Compare(other.m_jbig200x200Seq)) != EqualTo)
00927 return result;
00928 if ((result = m_jbig200x200Prog.Compare(other.m_jbig200x200Prog)) != EqualTo)
00929 return result;
00930 if ((result = m_jbig300x300Seq.Compare(other.m_jbig300x300Seq)) != EqualTo)
00931 return result;
00932 if ((result = m_jbig300x300Prog.Compare(other.m_jbig300x300Prog)) != EqualTo)
00933 return result;
00934 if ((result = m_digPhotoLow.Compare(other.m_digPhotoLow)) != EqualTo)
00935 return result;
00936 if ((result = m_digPhotoMedSeq.Compare(other.m_digPhotoMedSeq)) != EqualTo)
00937 return result;
00938 if ((result = m_digPhotoMedProg.Compare(other.m_digPhotoMedProg)) != EqualTo)
00939 return result;
00940 if ((result = m_digPhotoHighSeq.Compare(other.m_digPhotoHighSeq)) != EqualTo)
00941 return result;
00942 if ((result = m_digPhotoHighProg.Compare(other.m_digPhotoHighProg)) != EqualTo)
00943 return result;
00944
00945 return PASN_Sequence::Compare(other);
00946 }
00947
00948
00949 PINDEX H245_T84Profile_t84Restricted::GetDataLength() const
00950 {
00951 PINDEX length = 0;
00952 length += m_qcif.GetObjectLength();
00953 length += m_cif.GetObjectLength();
00954 length += m_ccir601Seq.GetObjectLength();
00955 length += m_ccir601Prog.GetObjectLength();
00956 length += m_hdtvSeq.GetObjectLength();
00957 length += m_hdtvProg.GetObjectLength();
00958 length += m_g3FacsMH200x100.GetObjectLength();
00959 length += m_g3FacsMH200x200.GetObjectLength();
00960 length += m_g4FacsMMR200x100.GetObjectLength();
00961 length += m_g4FacsMMR200x200.GetObjectLength();
00962 length += m_jbig200x200Seq.GetObjectLength();
00963 length += m_jbig200x200Prog.GetObjectLength();
00964 length += m_jbig300x300Seq.GetObjectLength();
00965 length += m_jbig300x300Prog.GetObjectLength();
00966 length += m_digPhotoLow.GetObjectLength();
00967 length += m_digPhotoMedSeq.GetObjectLength();
00968 length += m_digPhotoMedProg.GetObjectLength();
00969 length += m_digPhotoHighSeq.GetObjectLength();
00970 length += m_digPhotoHighProg.GetObjectLength();
00971 return length;
00972 }
00973
00974
00975 BOOL H245_T84Profile_t84Restricted::Decode(PASN_Stream & strm)
00976 {
00977 if (!PreambleDecode(strm))
00978 return FALSE;
00979
00980 if (!m_qcif.Decode(strm))