parent
4748956e5b
commit
5039bc6f75
@ -0,0 +1,16 @@
|
||||
diff --git a/screencast/pipewirestream.cpp b/screencast/pipewirestream.cpp
|
||||
index 1203d14..846b6a4 100644
|
||||
--- a/screencast/pipewirestream.cpp
|
||||
+++ b/screencast/pipewirestream.cpp
|
||||
@@ -235,7 +235,10 @@ bool PipeWireStream::createStream()
|
||||
|
||||
spa_rectangle resolution = SPA_RECTANGLE(uint32_t(m_resolution.width()), uint32_t(m_resolution.height()));
|
||||
|
||||
- const auto format = m_hasAlpha ? SPA_VIDEO_FORMAT_BGRA : SPA_VIDEO_FORMAT_BGR;
|
||||
+ auto canCreateDmaBuf = [this] () -> bool {
|
||||
+ return QSharedPointer<DmaBufTexture>(kwinApp()->platform()->createDmaBufTexture(m_resolution));
|
||||
+ };
|
||||
+ const auto format = m_hasAlpha || canCreateDmaBuf() ? SPA_VIDEO_FORMAT_BGRA : SPA_VIDEO_FORMAT_BGR;
|
||||
|
||||
const spa_pod *param = (spa_pod*)spa_pod_builder_add_object(&podBuilder,
|
||||
SPA_TYPE_OBJECT_Format, SPA_PARAM_EnumFormat,
|
Loading…
Reference in new issue