From e838c4fb0e1a585ec925d8d04d13ec33d09e55b3 Mon Sep 17 00:00:00 2001 From: Vicki Pfau Date: Sun, 26 Mar 2017 12:24:45 -0700 Subject: [PATCH] Qt: Add HEVC and NVENC to video formats --- src/platform/qt/VideoView.cpp | 4 ++++ src/platform/qt/VideoView.ui | 9 +++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src/platform/qt/VideoView.cpp b/src/platform/qt/VideoView.cpp index 6a6523b6e..681371217 100644 --- a/src/platform/qt/VideoView.cpp +++ b/src/platform/qt/VideoView.cpp @@ -63,7 +63,9 @@ VideoView::VideoView(QWidget* parent) if (s_vcodecMap.empty()) { s_vcodecMap["dirac"] = "libschroedinger"; s_vcodecMap["h264"] = "libx264"; + s_vcodecMap["h264 nvenc"] = "h264_nvenc"; s_vcodecMap["hevc"] = "libx265"; + s_vcodecMap["hevc nvenc"] = "hevc_nvenc"; s_vcodecMap["theora"] = "libtheora"; s_vcodecMap["vp8"] = "libvpx"; s_vcodecMap["vp9"] = "libvpx-vp9"; @@ -458,6 +460,8 @@ void VideoView::uncheckIncompatible() { QString VideoView::sanitizeCodec(const QString& codec, const QMap& mapping) { QString sanitized = codec.toLower(); sanitized = sanitized.remove(QChar('.')); + sanitized = sanitized.remove(QChar('(')); + sanitized = sanitized.remove(QChar(')')); if (mapping.contains(sanitized)) { sanitized = mapping[sanitized]; } diff --git a/src/platform/qt/VideoView.ui b/src/platform/qt/VideoView.ui index ff9dcaed1..4bdcefe75 100644 --- a/src/platform/qt/VideoView.ui +++ b/src/platform/qt/VideoView.ui @@ -266,12 +266,17 @@ - VP8 + h.264 (NVENC) - Xvid + HEVC + + + + + VP8