Ejemplo n.º 1
0
  void
  VideoPicture :: setComplete(
      bool aIsComplete,
      IPixelFormat::Type format,
      int width,
      int height,
      int64_t pts
  )
  {
    try {
      mIsComplete = aIsComplete;

      if (mIsComplete)
      {
        setPts(pts);
      }

      if (!mFrame)
        throw std::runtime_error("no AVFrame allocated");
      if (format != IPixelFormat::NONE && mFrame->format != (int)IPixelFormat::NONE && (int)format != mFrame->format)
        throw std::runtime_error("pixel formats don't match");
      if (width > 0 && mFrame->width >0 && width != mFrame->width)
        throw std::runtime_error("width does not match");
      if (height > 0 && mFrame->height > 0 && height != mFrame->height)
        throw std::runtime_error("height does not match");
    }
    catch (std::exception& e)
    {
      VS_LOG_DEBUG("error: %s", e.what());
    }
  }
Ejemplo n.º 2
0
// like setPts
plane::
plane ( const vec3& pt1, const vec3& pt2, const vec3& pt3 ) :
	normal ( vec3::NoInit )
{
	setPts ( pt1, pt2, pt3 );
}