[Opalvoip-svn] SF.net SVN: opalvoip:[29805] opal/branches/v3_12/samples/openphone/main.cxx
Brought to you by:
csoutheren,
rjongbloed
From: <rjo...@us...> - 2013-05-27 05:56:07
|
Revision: 29805 http://sourceforge.net/p/opalvoip/code/29805 Author: rjongbloed Date: 2013-05-27 05:56:04 +0000 (Mon, 27 May 2013) Log Message: ----------- Fixed default media order and mask on first time run of OpenPhone Modified Paths: -------------- opal/branches/v3_12/samples/openphone/main.cxx Modified: opal/branches/v3_12/samples/openphone/main.cxx =================================================================== --- opal/branches/v3_12/samples/openphone/main.cxx 2013-05-27 05:23:27 UTC (rev 29804) +++ opal/branches/v3_12/samples/openphone/main.cxx 2013-05-27 05:56:04 UTC (rev 29805) @@ -1264,15 +1264,18 @@ if (codecIndex > 0) ApplyMediaInfo(); else { + PStringSet mediaFormatMask = GetMediaFormatMask(); PStringArray mediaFormatOrder = GetMediaFormatOrder(); for (PINDEX i = 0; i < mediaFormatOrder.GetSize(); i++) { + if (mediaFormatMask.Contains(mediaFormatOrder[i])) + continue; for (MyMediaList::iterator mm = m_mediaInfo.begin(); mm != m_mediaInfo.end(); ++mm) { if (mm->mediaFormat == mediaFormatOrder[i]) mm->preferenceOrder = codecIndex++; } } for (MyMediaList::iterator mm = m_mediaInfo.begin(); mm != m_mediaInfo.end(); ++mm) { - if (mm->preferenceOrder < 0) + if (!mediaFormatMask.Contains(mm->mediaFormat.GetName()) && mm->preferenceOrder < 0) mm->preferenceOrder = codecIndex++; } m_mediaInfo.sort(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |