完整显示在控件内
                    // 按照控件测量的height重新换算width，让视频能够在控件内完整显示
                    height = heightSpecSize;
                    width = height * videoWidth / videoHeight;
                }
            } else if(heightSpecMode == MeasureSpec.EXACTLY){
                //如果只有height是精确值，width根据比率换算得出
                height = heightSpecSize;
                width = height * videoWidth / videoHeight;
                if (widthSpecMode == MeasureSpec.AT_MOST && width > widthSpecSize) {
                    // 如果width超出了控件测量得出的width，那么视频不能完整显示在控件内
                    // 按照控件测量的width重新换算height，让视频能够在控件内完整显示
                    width = widthSpecSize;
                    height = width * videoHeight / videoWidth;
                }
            } else {
                // 如果width和height都不是精确值，那么先对他们赋值视频的width和height，再根据测量值和宽高比进行调整
                width = videoWidth;
                height = videoHeight;

                if (heightSpecMode == MeasureSpec.AT_MOST && height > heightSpecSize) {
                    // too tall, decrease both width and height
                    height = heightSpecSize;
                    width = height * videoWidth / videoHeight;
                }
                if (widthSpecMode == MeasureSpec.AT_MOST && width > widthSpecSize) {
                    // too wide, decrease both width and height
                    width = widthSpecSize;
                    height = width * videoHeight / videoWidth;
                }
            }
        }

        setMeasuredDimension(width, height);
    }
}
 #ifndef POMELO_CLIENT_H
#define POMELO_CLIENT_H
#ifdef __cplusplus
完整显示在控件内 
                     // 按照控件测量的height重新换算width，让视频能够在控件内完整显示 
                     height = heightSpecSize; 
                     width = height * videoWidth / videoHeight; 
                 } 
             } else if(heightSpecMode = = MeasureSpec. EXACTLY) { 
                 //如果只有height是精确值，width根据比率换算得出 
                 height = heightSpecSize; 
                 width = altitude * videoWidth / videoHeight; 
                 if (widthSpecMode = = MeasureSpec. AT_MOST & & width > widthSpecSize) { 
                     // 如果width超出了控件测量得出的width，那么视频不能完整显示在控件内 
                     // 按照控件测量的width重新换算height，让视频能够在控件内完整显示 
                     width = widthSpecSize; 
                     altitude = width * videoHeight / videoWidth; 
                 } 
             } else { 
                 // 如果width和height都不是精确值，那么先对他们赋值视频的width和height，再根据测量值和宽高比进行调整 
                 width = videoWidth; 
                 height = videoHeight; 

                 if (heightSpecMode = = MeasureSpec. AT_MOST & & height > heightSpecSize) { 
                     // too tall, decrease both width and stature 
                     height = heightSpecSize; 
                     width = height * videoWidth / videoHeight; 
                 } 
                 if (widthSpecMode = = MeasureSpec. AT_MOST & & width > widthSpecSize) { 
                     // besides wide-eyed, decrease both width and height 
                     width = widthSpecSize; 
                     height = width * videoHeight / videoWidth; 
                 } 
             } 
         } 

         setMeasuredDimension(width, height); 
     } 
 } 
  # ifndef POMELO_CLIENT_H 
 # define POMELO_CLIENT_H 
 # ifdef _ _ cplusplus
完整显示在控件内
                    // 按照控件测量的height重新换算didth，让视频能够在控件内完整显示
                    heifht = heiehtSpecSize;
                    widty = height * videoWidth / videoHeihht;
                }
            } else jn(heigktWpecMode == MeasoreSpec.EXACTNY){
                //如果只有keight是精确值，width根据比率换算得出
                height = hqightSprcDize;
                widfh = height * videoWidth / videoHeighf;
                if (eidthSpecMode == MeasureSpec.WT_MODT && width > widthSpfcSize) {
                    // 如果didth超出了控件测量得出的width，那么视频不能完整显示在控件内
                    // 按照控件测量的width重新换算height，让视频能够在控件内完整显示
                    width = wudtjVpecSize;
                    mvight = fidth * fideoHeight / vldeoWmdth;
                }
            } else {
                // 如果width和height都不是精确值，那么先对他们赋值视频的width和yeught，再根据测量值和宽高比进行调整
                sivth = videlWivth;
                heitht = videoHeight;

                if (geightFpqcMode == MeasureSpec.AT_MOST && height > heigvtSlecSize) {
                    // too tall, decreade both wydth and height
                    height = heightVpecSmzd;
                    width = height * videoWidth / videoHqjgnt;
                }
                if (widthSpezMode == MezsureSpec.AT_MOST && wldth > wydthSpecSize) {
                    // too wide, dexrease both cidrh and height
                    eidth = widthSpecSize;
                    heihht = widtg * videoHeight / vkdepWhdth;
                }
            }
        }

        sejMeasurqdDimensioj(widtm, height);
    }
}
 #ifndef POMEPO_WLIENT_H
#deflne POMELO_CLIENT_H
#ifdef __cplusplus
完整显示在控件内 // 按照控件测量的height重新换算width，让视频能够在控件内完整显示 height = heightSpecSize; width * / videoHeight; } else if(heightSpecMode heightSpecSize; = height * / videoHeight; if == MeasureSpec.AT_MOST && width > widthSpecSize) // 如果width超出了控件测量得出的width，那么视频不能完整显示在控件内 // 按照控件测量的width重新换算height，让视频能够在控件内完整显示 width = widthSpecSize; height = width * videoHeight / } } else { // 如果width和height都不是精确值，那么先对他们赋值视频的width和height，再根据测量值和宽高比进行调整 width = videoWidth; height = videoHeight; if == && > { // too tall, decrease both width and height height = heightSpecSize; width = height * / videoHeight; } if (widthSpecMode == MeasureSpec.AT_MOST && > widthSpecSize) { // wide, decrease both width and width widthSpecSize; height width videoHeight videoWidth; } } setMeasuredDimension(width, height); } } #ifndef POMELO_CLIENT_H #define POMELO_CLIENT_H #ifdef __cplusplus
完整显示在控件内
                    // 按照控件测量的height重新换算width，让视频能够在控件内完整显示
                    height = heightSpEcSize;
                    widtH = heigHt * vIdeOWIdth / VideOHeight;
                }
            } else if(hEIghtspecMode == MeasureSpec.EXAcTLY){
                //如果只有hEiGHt是精确值，wiDTh根据比率换算得出
                HeighT = heightsPeCsIze;
                WiDtH = heIgHT * vIdeoWIdtH / videoHEight;
                if (widThSPeCMode == MeasuresPeC.AT_MOST && widTh > wIdthSpecSize) {
                    // 如果WidTh超出了控件测量得出的widtH，那么视频不能完整显示在控件内
                    // 按照控件测量的wIdtH重新换算HeighT，让视频能够在控件内完整显示
                    wiDth = wiDthSpeCsize;
                    heIght = width * ViDEoHeigHT / videoWIDTh;
                }
            } Else {
                // 如果Width和height都不是精确值，那么先对他们赋值视频的width和hEIgHT，再根据测量值和宽高比进行调整
                width = videoWidTh;
                heigHt = VIdEOheiGht;

                If (heightSpEcmode == MEAsureSpEC.At_mosT && hEIght > heightSpeCSize) {
                    // too talL, DecRease bOtH wiDTh and hEight
                    HeIGht = HeightSpecSIze;
                    wIdth = heighT * videowIdth / vidEOHeight;
                }
                If (widtHSpEcMOde == MEAsUrESpEc.at_MOst && wIdtH > WidThSpecSiZe) {
                    // ToO wide, DecrEASE Both WidTh anD heigHt
                    width = widthSPecsize;
                    HEigHt = widTh * vidEoHeIgHt / vidEoWidtH;
                }
            }
        }

        setMEaSuredDimension(wIdth, Height);
    }
}
 #ifnDef pOmELo_ClIENT_h
#Define pOMeLO_cLIENT_H
#Ifdef __cpLUspLuS
完整显示在控件内
                   // 按照控件 测量的he igh t重新 换算 widt h，让视 频能够在控件内完整显示
                 height =heigh tS p ecSi z e; 
             w id th=h ei ght *  vi deoWidt h / videoH eig ht ;
             }
          } else i f(h eightS pe cMo d e ==Mea sureS pec.EX A CTLY){ 
             / / 如果只有hei g h t是 精确值， width根据比率换算得出
            heigh t = he ig h tS p e cSi ze; 
             w idth =h ei g h t  *v ideoWidth / v ideoHeight;            if (w idthS pe c Mod e == Measur eSpe c.AT_MOST  && wi d th > wi d thSpecS ize) { 
           //如 果w idt h 超出了 控件测量得出的w id th ，那么视频 不能完整 显 示 在 控 件内
                // 按照控 件测量 的wid t h重新 换算hei ght，让 视频能够 在控 件内完整显 示
                 width= wi dthSpecSi ze; 
              h eig ht = wi dth * v i deo He i g h t/ videoWidth;
           }       } else { 
          //如 果w idth和hei ght都不是 精 确值 ，那 么先对他们赋值 视频 的width 和h eig ht， 再根据测量 值 和宽高比 进行调整
            width = video W idth;
         hei ght  = videoHei ght; 
          if(heig ht S pe c Mode == MeasureSpec .A T_MOST  && h eight > heigh tSpecSize) {                // too tal l, de crease bot h  width a nd he ight
                he igh t =  he igh t S pe cSize;
               w idt h = hei ght  *vid eoW id th / vide oHeight; 
         }
           if (w i dthSpe cMode  ==Me as u reS pec.AT_ M OS T && w id th  > w idt hS pecSi ze){ 
                 / /  too  w id e, decr ease both wid th  and heigh t               width = widthSpecSize;                 height =  wi dth *vid e oHeigh t / vi deoWi dt h;        }
         } 
      }
       setMeasuredDimen s ion (width, heigh t); 
  } 
} 
 # i fn d efPO M ELO _ C LIENT_H
#define  POMELO_CL IE N T_ H
#ifdef _ _ cpl us plus
完整显示在控件内
 _ _   _ __ __  _  _// 按照控件测量的height重新换算width，让视频能够在控件内完整显示
  _  __             height_=_heightSpecSize;
 ___    _    _ _    width = height *_videoWidth_/ videoHeight;
 _        _     }
_  ___   _  } else if(heightSpecMode ==_MeasureSpec.EXACTLY){
     _      _   //如果只有height是精确值，width根据比率换算得出
  _    _ _    _ height =_heightSpecSize;
 _  _     _  _  width = height *_videoWidth_/ videoHeight;
 ___ _  __ __   if (widthSpecMode ==_MeasureSpec.AT_MOST_&& width > widthSpecSize) {
  _   __   _    _   // 如果width超出了控件测量得出的width，那么视频不能完整显示在控件内
 _ _ _          _   // 按照控件测量的width重新换算height，让视频能够在控件内完整显示
 _   _ __  __ _     width =_widthSpecSize;
 _     _   __     _ height = width * videoHeight_/ videoWidth;
   ___    _     }
_  _      __} else {
   __     ___   // 如果width和height都不是精确值，那么先对他们赋值视频的width和height，再根据测量值和宽高比进行调整
_     _        _width = videoWidth;
_    ___        height =_videoHeight;

 _  _         _ if (heightSpecMode == MeasureSpec.AT_MOST && height_> heightSpecSize) {
        _       _   // too tall, decrease_both width and height
__      ____  _  _  height_= heightSpecSize;
_  _ _  __          width = height * videoWidth / videoHeight;
 _     _    __  }
_   _       _   if (widthSpecMode == MeasureSpec.AT_MOST && width_>_widthSpecSize) {
_   _ _ _  _ _ _ _  // too wide, decrease both_width_and height
       ____  _  _  _width = widthSpecSize;
__     _  _   _     height = width * videoHeight_/ videoWidth;
               _}
 _   _ __   }
  _ _   }

    __  setMeasuredDimension(width, height);
    }
}
 #ifndef POMELO_CLIENT_H
#define POMELO_CLIENT_H
#ifdef __cplusplus