From 6e03c988736cfb8a5babbba2e3d4405854dfaff1 Mon Sep 17 00:00:00 2001 From: Jan Grulich Date: Mon, 27 Jun 2022 20:09:08 +0200 Subject: [PATCH] Make "failed to query DMA-BUF modifiers" just warning message It's not a problem if we fail to query DMA-BUF modifiers as we can still continue with modifier-less buffers. Bug: webrtc:13429 Change-Id: Ia718362bdc9eef1ebc54c06b24a2b65206aa873e Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/267003 Reviewed-by: Alexander Cooper Commit-Queue: Jan Grulich Cr-Commit-Position: refs/heads/main@{#37342} --- modules/desktop_capture/linux/wayland/egl_dmabuf.cc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/modules/desktop_capture/linux/wayland/egl_dmabuf.cc b/modules/desktop_capture/linux/wayland/egl_dmabuf.cc index 1d364da036..5bbd5d7aba 100644 --- a/modules/desktop_capture/linux/wayland/egl_dmabuf.cc +++ b/modules/desktop_capture/linux/wayland/egl_dmabuf.cc @@ -635,7 +635,7 @@ std::vector EglDmaBuf::QueryDmaBufModifiers(uint32_t format) { EglQueryDmaBufFormatsEXT(egl_.display, 0, nullptr, &count); if (!success || !count) { - RTC_LOG(LS_ERROR) << "Failed to query DMA-BUF formats."; + RTC_LOG(LS_WARNING) << "Cannot query the number of formats."; return {DRM_FORMAT_MOD_INVALID}; } @@ -643,13 +643,13 @@ std::vector EglDmaBuf::QueryDmaBufModifiers(uint32_t format) { if (!EglQueryDmaBufFormatsEXT(egl_.display, count, reinterpret_cast(formats.data()), &count)) { - RTC_LOG(LS_ERROR) << "Failed to query DMA-BUF formats."; + RTC_LOG(LS_WARNING) << "Cannot query a list of formats."; return {DRM_FORMAT_MOD_INVALID}; } if (std::find(formats.begin(), formats.end(), drm_format) == formats.end()) { - RTC_LOG(LS_ERROR) << "Format " << drm_format - << " not supported for modifiers."; + RTC_LOG(LS_WARNING) << "Format " << drm_format + << " not supported for modifiers."; return {DRM_FORMAT_MOD_INVALID}; } @@ -657,14 +657,14 @@ std::vector EglDmaBuf::QueryDmaBufModifiers(uint32_t format) { nullptr, &count); if (!success || !count) { - RTC_LOG(LS_ERROR) << "Failed to query DMA-BUF modifiers."; + RTC_LOG(LS_WARNING) << "Cannot query the number of modifiers."; return {DRM_FORMAT_MOD_INVALID}; } std::vector modifiers(count); if (!EglQueryDmaBufModifiersEXT(egl_.display, drm_format, count, modifiers.data(), nullptr, &count)) { - RTC_LOG(LS_ERROR) << "Failed to query DMA-BUF modifiers."; + RTC_LOG(LS_WARNING) << "Cannot query a list of modifiers."; } // Support modifier-less buffers