本文整理汇总了C++中VideoMode::getPixelFormat方法的典型用法代码示例。如果您正苦于以下问题:C++ VideoMode::getPixelFormat方法的具体用法?C++ VideoMode::getPixelFormat怎么用?C++ VideoMode::getPixelFormat使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类VideoMode
的用法示例。
在下文中一共展示了VideoMode::getPixelFormat方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: printVideoMode
void DeviceController::printVideoMode(VideoMode mode)
{
PixelFormat pixelFormat = mode.getPixelFormat();
string pixelFormatName;
switch (pixelFormat)
{
case PIXEL_FORMAT_DEPTH_1_MM:
{
pixelFormatName = "PIXEL_FORMAT_DEPTH_1_MM";
break;
}
case PIXEL_FORMAT_DEPTH_100_UM:
{
pixelFormatName = "PIXEL_FORMAT_DEPTH_100_UM";
break;
}
case PIXEL_FORMAT_SHIFT_9_2:
{
pixelFormatName = "PIXEL_FORMAT_SHIFT_9_2";
break;
}
case PIXEL_FORMAT_SHIFT_9_3:
{
pixelFormatName = "PIXEL_FORMAT_SHIFT_9_3";
break;
}
case PIXEL_FORMAT_RGB888:
{
pixelFormatName = "PIXEL_FORMAT_RGB888";
break;
}
case PIXEL_FORMAT_YUV422:
{
pixelFormatName = "PIXEL_FORMAT_YUV422";
break;
}
case PIXEL_FORMAT_GRAY8:
{
pixelFormatName = "PIXEL_FORMAT_GRAY8";
break;
}
case PIXEL_FORMAT_GRAY16:
{
pixelFormatName = "PIXEL_FORMAT_GRAY16";
break;
}
case PIXEL_FORMAT_JPEG:
{
pixelFormatName = "PIXEL_FORMAT_JPEG";
break;
}
}
ofLogVerbose() << "PixelFormat: " << pixelFormatName;
ofLogVerbose() << "ResolutionX: " << mode.getResolutionX();
ofLogVerbose() << "ResolutionY: " << mode.getResolutionY();
ofLogVerbose() << "FPS: " << mode.getFps();
}