Delete RawVideoType enum, use the VideoType enum instead.

BUG=webrtc:7385

Review-Url: https://codereview.webrtc.org/2765243002
Cr-Commit-Position: refs/heads/master@{#17930}
This commit is contained in:
nisse
2017-04-28 07:18:05 -07:00
committed by Commit bot
parent aec49d2b49
commit eb44b39a21
31 changed files with 261 additions and 309 deletions

View File

@ -287,26 +287,26 @@ int32_t DeviceInfoLinux::FillCapabilities(int fd)
cap.height = video_fmt.fmt.pix.height;
if (videoFormats[fmts] == V4L2_PIX_FMT_YUYV)
{
cap.rawType = kVideoYUY2;
cap.videoType = VideoType::kYUY2;
}
else if (videoFormats[fmts] == V4L2_PIX_FMT_YUV420)
{
cap.rawType = kVideoI420;
cap.videoType = VideoType::kI420;
}
else if (videoFormats[fmts] == V4L2_PIX_FMT_MJPEG)
{
cap.rawType = kVideoMJPEG;
cap.videoType = VideoType::kMJPEG;
}
else if (videoFormats[fmts] == V4L2_PIX_FMT_UYVY)
{
cap.rawType = kVideoUYVY;
cap.videoType = VideoType::kUYVY;
}
// get fps of current camera mode
// V4l2 does not have a stable method of knowing so we just guess.
if(cap.width >= 800 && cap.rawType != kVideoMJPEG)
{
cap.maxFPS = 15;
if (cap.width >= 800 &&
cap.videoType != VideoType::kMJPEG) {
cap.maxFPS = 15;
}
else
{
@ -318,7 +318,7 @@ int32_t DeviceInfoLinux::FillCapabilities(int fd)
WEBRTC_TRACE(
webrtc::kTraceInfo, webrtc::kTraceVideoCapture, 0,
"Camera capability, width:%d height:%d type:%d fps:%d",
cap.width, cap.height, cap.rawType, cap.maxFPS);
cap.width, cap.height, cap.videoType, cap.maxFPS);
}
}
}