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 <alcooper@chromium.org> Commit-Queue: Jan Grulich <grulja@gmail.com> Cr-Commit-Position: refs/heads/main@{#37342}
This commit is contained in:
parent
b049e6ed80
commit
6e03c98873
@ -635,7 +635,7 @@ std::vector<uint64_t> 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<uint64_t> EglDmaBuf::QueryDmaBufModifiers(uint32_t format) {
|
||||
if (!EglQueryDmaBufFormatsEXT(egl_.display, count,
|
||||
reinterpret_cast<EGLint*>(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<uint64_t> 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<uint64_t> 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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user