houxiao
2017-02-13 0688756b71b40e0ac60c68af2fa1fe4aaeb1718d
RtspFace/PL_Scale.cpp
@@ -77,7 +77,7 @@
   
   if (in->config.toWidth <= 0 || in->config.toHeight <= 0)
   {
      LOG_ERROR << "Config toWidth and toHeight should > 0";
      LOG_ERROR << "Config toWidth and toHeight should > 0" << std::endl;
      return false;
   }
   
@@ -105,7 +105,7 @@
      dstSizeMax = in->config.toWidth * in->config.toHeight * 4;
   else
   {
      LOG_ERROR << "srcType only support MBFT_YUV420 and MBFT_BGRA";
      LOG_ERROR << "srcType only support MBFT_YUV420 and MBFT_BGRA" << std::endl;
      return false;
   }
   
@@ -115,7 +115,7 @@
         delete[] in->buffer;
      in->buffer = new uint8_t[dstSizeMax];
      in->buffSizeMax = dstSizeMax;
      LOG_INFO << "image_scale alloc buffer size=" << dstSizeMax;
      LOG_INFO << "image_scale alloc buffer size=" << dstSizeMax << std::endl;
   }
   
   if (srcType == MB_Frame::MBFT_YUV420)
@@ -143,7 +143,7 @@
   else if (srcType == MB_Frame::MBFT_BGRA)
   {
      //#todo
      LOG_ERROR << "srcType only support MBFT_YUV420 and MBFT_BGRA";
      LOG_ERROR << "srcType only support MBFT_YUV420 and MBFT_BGRA" << std::endl;
      return false;
   }
}
@@ -168,7 +168,7 @@
      if (in->config.defaultBytesType <= 0 || 
         in->config.defaultBytesWidth <= 0 || in->config.defaultBytesHeight <= 0)
      {
         LOG_ERROR << "defaultBytesType/defaultBytesWidth/defaultBytesHeight not set";
         LOG_ERROR << "defaultBytesType/defaultBytesWidth/defaultBytesHeight not set" << std::endl;
         return false;
      }
      
@@ -188,13 +188,13 @@
            frame->width, frame->height);
         break;
      default:
         LOG_ERROR << "Only support MBFT_YUV420 / MBFT_BGRA";
         LOG_ERROR << "Only support MBFT_YUV420 / MBFT_BGRA" << std::endl;
         return false;
      }
   }
   break;
   default:
      LOG_ERROR << "Only support PMT_BYTES / PMT_FRAME";
      LOG_ERROR << "Only support PMT_BYTES / PMT_FRAME" << std::endl;
      return false;
   }
   
@@ -232,7 +232,7 @@
   }
   break;
   default:
      LOG_ERROR << "Only support PMT_BYTES / PMT_FRAME";
      LOG_ERROR << "Only support PMT_BYTES / PMT_FRAME" << std::endl;
   }
   pm = newPm;