From 9740a79cdad6b8ae74f7e378fb07c588385b63ce Mon Sep 17 00:00:00 2001 From: philippegorley <philippe.gorley@savoirfairelinux.com> Date: Fri, 23 Aug 2019 14:10:09 -0400 Subject: [PATCH] accel: remove libdrm code Change-Id: I21af38d6a5fcd36d11955b185f0858c8bb07a278 Gitlab: #135 --- src/media/video/accel.cpp | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/src/media/video/accel.cpp b/src/media/video/accel.cpp index db291a54bf..88033142da 100644 --- a/src/media/video/accel.cpp +++ b/src/media/video/accel.cpp @@ -155,23 +155,7 @@ HardwareAccel::setDetails(AVCodecContext* codecCtx) bool HardwareAccel::initDevice() { - int ret = 0; - // default DRM device may not work on multi GPU computers, so check all possible values - if (hwType_ == AV_HWDEVICE_TYPE_VAAPI) { - const std::string path = "/dev/dri/"; - auto files = jami::fileutils::readDirectory(path); - // renderD* is preferred over card* - std::sort(files.rbegin(), files.rend()); - for (auto& entry : files) { - std::string deviceName = path + entry; - if ((ret = av_hwdevice_ctx_create(&deviceCtx_, hwType_, deviceName.c_str(), nullptr, 0)) >= 0) { - return true; - } - } - } - // default device (nullptr) works for most cases - ret = av_hwdevice_ctx_create(&deviceCtx_, hwType_, nullptr, nullptr, 0); - return ret >= 0; + return av_hwdevice_ctx_create(&deviceCtx_, hwType_, nullptr, nullptr, 0) >= 0; } bool -- GitLab