Skip to content

Commit 055e8dd

Browse files
committed
Testing: turn EGL off 7
1 parent 84ef4e0 commit 055e8dd

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

sources/grabber/linux/pipewire/PipewireHandler.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -624,6 +624,7 @@ void PipewireHandler::onStateChanged(pw_stream_state old, pw_stream_state state,
624624

625625
void PipewireHandler::onParamsChanged(uint32_t id, const struct spa_pod* param)
626626
{
627+
bool hasDma = false;
627628
struct spa_video_info format {};
628629

629630
std::cout << "Pipewire: got new video format selected" << std::endl;
@@ -646,6 +647,8 @@ void PipewireHandler::onParamsChanged(uint32_t id, const struct spa_pod* param)
646647
_frameOrderRgb = (format.info.raw.format == SPA_VIDEO_FORMAT_RGBx || format.info.raw.format == SPA_VIDEO_FORMAT_RGBA);
647648

648649
#ifdef ENABLE_PIPEWIRE_EGL
650+
hasDma = true;
651+
649652
for (const supportedDmaFormat& val : _supportedDmaFormatsList)
650653
if (val.spaFormat == format.info.raw.format)
651654
{
@@ -668,7 +671,7 @@ void PipewireHandler::onParamsChanged(uint32_t id, const struct spa_pod* param)
668671
? (1 << SPA_DATA_DmaBuf) | (1 << SPA_DATA_MemFd) | (1 << SPA_DATA_MemPtr)
669672
: (1 << SPA_DATA_MemFd) | (1 << SPA_DATA_MemPtr);
670673

671-
const bool hasDma = (bufferTypes & (1 << SPA_DATA_DmaBuf));
674+
hasDma = hasDma && (bufferTypes & (1 << SPA_DATA_DmaBuf));
672675

673676
// display capabilities
674677
if (hasDma)

0 commit comments

Comments
 (0)