"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "plugins/video/common/mpi.cxx" between
h323plus-1_27_0.tar.gz and h323plus-1_27_1.tar.gz

About: H.323 Plus offers libraries for voice (VoIP) and videoconferencing using H.323.

mpi.cxx  (h323plus-1_27_0):mpi.cxx  (h323plus-1_27_1)
skipping to change at line 135 skipping to change at line 135
unsigned minIndex = 0; unsigned minIndex = 0;
unsigned distance = 0; unsigned distance = 0;
if (MPIs.size() == 0) { if (MPIs.size() == 0) {
return false; return false;
} }
// we first find out which supported resolution is closest // we first find out which supported resolution is closest
// to the desired one or matches it // to the desired one or matches it
for (i=0; i < MPIs.size(); i++) { for (i=0; i < MPIs.size(); i++) {
// we square the value in order to get absolute distances // we square the value in order to get absolute distances
distance = ( abs(MPIs[i].width - desiredWidth ) * distance = ( abs(int(MPIs[i].width - desiredWidth) ) *
abs(MPIs[i].height - desiredHeight) ); abs(int(MPIs[i].height - desiredHeight)) );
if (distance < minDistance) { if (distance < minDistance) {
minDistance = distance; minDistance = distance;
minIndex = i; minIndex = i;
} }
} }
*width = MPIs[minIndex].width; *width = MPIs[minIndex].width;
*height = MPIs[minIndex].height; *height = MPIs[minIndex].height;
 End of changes. 1 change blocks. 
2 lines changed or deleted 2 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)