[Opalvoip-svn] SF.net SVN: opalvoip:[31003] opal/trunk
Brought to you by:
csoutheren,
rjongbloed
From: <rjo...@us...> - 2013-11-28 23:16:06
|
Revision: 31003 http://sourceforge.net/p/opalvoip/code/31003 Author: rjongbloed Date: 2013-11-28 23:16:01 +0000 (Thu, 28 Nov 2013) Log Message: ----------- Merged revision(s) 30979-31002 from opal/branches/v3_12: Repaired damage from changes to OpalMediaFormat::Update() which fixed incorrect video clamping. Sometimes you merge, sometimes you copy. Modified Paths: -------------- opal/trunk/include/opal/mediafmt.h opal/trunk/src/opal/mediafmt.cxx opal/trunk/src/opal/transcoders.cxx opal/trunk/src/sip/sipcon.cxx Property Changed: ---------------- opal/trunk/ Index: opal/trunk =================================================================== --- opal/trunk 2013-11-28 22:53:33 UTC (rev 31002) +++ opal/trunk 2013-11-28 23:16:01 UTC (rev 31003) Property changes on: opal/trunk ___________________________________________________________________ Modified: svn:mergeinfo ## -6,7 +6,7 ## /opal/branches/csoutheren/LalandeBranch1:23412-23413,23415,23424,23510,23516,23553,23577,23607,23669,23724,23742-23744,23747-23748,23755,23758,23780,23788,23848,23850,23856 /opal/branches/rjongbloed/BarnardPlus:20584,20656,20749,20751,20756,20762,20786,20789,20814,20820,20829,20831,20841,20843,20923,20927,20938,22016-22017,22518,22582,22941 /opal/branches/v3_10:25182-29485,30896 -/opal/branches/v3_12:28489-30978 +/opal/branches/v3_12:28489-31002 /opal/branches/v3_2:21143,21220,21227,21253,21455 /opal/branches/v3_4:21060,21062,21088,21092,21111,21113,21115,21119,21143,21148,21151-21152,21155,21158,21184,21188,21253,21265-21266,21283-21284,21298,21300,21303,21307,21309,21311,21327,21331,21333,21359,21367,21369,21488,21556,21564-21565,21568,21570,21620,21625,21631,21748,21751,21756,21759,21761,21767,21770,22246,23044,23140,23143,23286 /opal/branches/v3_6:22169,22178,22184,22186,22197,22204,22216,22251,22253,22255,22258,22260,22291,22296,22300,22306,22308,22313,22319,22336,22353,22358,22436,22447,22449,22497,22511,22517,22519-22521,22527,22536,22538,22589,22596,22599,22617,22620,22622,22630,22640,22655,22675,22682,22726-22728,22730,22733,22738,22745-22746,22800,22820-22821,22842,22844-22845,22851,22853,22889,22896,22902,22904,22906,22918,22924,22928,22946,22965,22967,22976,22978,22980,22982,22994,23028,23123,23125-23126,23128,23157,23165,23173,23175,23183,23294,23341,23465,23467,23474,23521,23829,24346,24809 \ No newline at end of property Modified: opal/trunk/include/opal/mediafmt.h =================================================================== --- opal/trunk/include/opal/mediafmt.h 2013-11-28 22:53:33 UTC (rev 31002) +++ opal/trunk/include/opal/mediafmt.h 2013-11-28 23:16:01 UTC (rev 31003) @@ -953,7 +953,8 @@ merged. */ bool Merge( - const OpalMediaFormat & mediaFormat + const OpalMediaFormat & mediaFormat, + bool copyPayloadType = false ); /**Return true if the given mediaFormat will successfully merge. */ Modified: opal/trunk/src/opal/mediafmt.cxx =================================================================== --- opal/trunk/src/opal/mediafmt.cxx 2013-11-28 22:53:33 UTC (rev 31002) +++ opal/trunk/src/opal/mediafmt.cxx 2013-11-28 23:16:01 UTC (rev 31003) @@ -994,19 +994,22 @@ return m_info->OpalMediaFormatInternal::Merge(*mediaFormat.m_info); } - PTRACE_IF(4, GetPayloadType() != mediaFormat.GetPayloadType(), - "MediaFormat\tChanging payload type from " << GetPayloadType() - << " to " << mediaFormat.GetPayloadType() << " in " << *this); - *this = mediaFormat; return true; } -bool OpalMediaFormat::Merge(const OpalMediaFormat & mediaFormat) +bool OpalMediaFormat::Merge(const OpalMediaFormat & mediaFormat, bool copyPayloadType) { PWaitAndSignal m(m_mutex); MakeUnique(); + + if (copyPayloadType && GetPayloadType() != mediaFormat.GetPayloadType()) { + PTRACE(4, "MediaFormat\tChanging payload type from " << GetPayloadType() + << " to " << mediaFormat.GetPayloadType() << " in " << *this); + SetPayloadType(mediaFormat.GetPayloadType()); + } + return m_info != NULL && mediaFormat.m_info != NULL && m_info->Merge(*mediaFormat.m_info); } Modified: opal/trunk/src/opal/transcoders.cxx =================================================================== --- opal/trunk/src/opal/transcoders.cxx 2013-11-28 22:53:33 UTC (rev 31002) +++ opal/trunk/src/opal/transcoders.cxx 2013-11-28 23:16:01 UTC (rev 31003) @@ -94,21 +94,9 @@ { PWaitAndSignal mutex(updateMutex); - bool ok = true; - if (input.IsValid()) { - if (input == inputMediaFormat) - ok = inputMediaFormat.Update(input); - else - ok = inputMediaFormat.Merge(input); - } + bool ok = inputMediaFormat.Update(input); + ok = outputMediaFormat.Update(output) && ok; // Avoid McCarthy boolean - if (output.IsValid()) { - if (output == outputMediaFormat) - ok = outputMediaFormat.Update(output) && ok; // Avoid McCarthy boolean - else - ok = outputMediaFormat.Merge(output) && ok; // Avoid McCarthy boolean - } - m_inClockRate = inputMediaFormat.GetClockRate(); m_outClockRate = outputMediaFormat.GetClockRate(); @@ -334,7 +322,7 @@ srcFormat = *masterFormat; PTRACE(5, "Initial source format from master:\n" << setw(-1) << srcFormat << "Merging with capability\n" << setw(-1) << srcCapability); - if (!srcFormat.Update(srcCapability)) // This includes the PayloadType, a normal Merge does not. + if (!srcFormat.Merge(srcCapability, true)) // Include the PayloadType. return false; } @@ -348,7 +336,7 @@ PTRACE(5, "Initial destination format from master:\n" << setw(-1) << dstFormat << "Merging with capability\n" << setw(-1) << dstCapability); - if (!dstFormat.Update(dstCapability)) // This includes the PayloadType, a normal Merge does not. + if (!dstFormat.Merge(dstCapability, true)) // Include the PayloadType. return false; } Modified: opal/trunk/src/sip/sipcon.cxx =================================================================== --- opal/trunk/src/sip/sipcon.cxx 2013-11-28 22:53:33 UTC (rev 31002) +++ opal/trunk/src/sip/sipcon.cxx 2013-11-28 23:16:01 UTC (rev 31003) @@ -725,7 +725,7 @@ // Merge remotes format into ours. // Note if this is our initial offer remote is the same as local. OpalMediaFormat adjustedFormat = *localFmt; - adjustedFormat.Update(*remFmt); + adjustedFormat.Merge(*remFmt, true); handler->SetTxMediaFormat(adjustedFormat); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |