PipeWire capturer: drop old DmaBuf support
Drop support for old compositors that don't use DmaBufs the way they are supposed to be used now. There is now a whole negotiation process that includes DmaBuf modifiers and there is also support for renegotiation in case we fail to import DmaBufs with certain modifier. This is something that didn't exist before and in such case, failing to import DmaBufs we would just end up with broken screen sharing. For that reason it would be better to use MemFD instead to make sure old compositors will work just fine Bug: webrtc:15029 Change-Id: Icc303504e510adc829c12feff7178ae01578a6da Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/298700 Reviewed-by: Alexander Cooper <alcooper@chromium.org> Commit-Queue: Jan Grulich <grulja@gmail.com> Cr-Commit-Position: refs/heads/main@{#39649}
This commit is contained in:
parent
74145adab5
commit
4bfc4ac4b0
@ -39,7 +39,6 @@ constexpr int CursorMetaSize(int w, int h) {
|
||||
w * h * kCursorBpp);
|
||||
}
|
||||
|
||||
constexpr PipeWireVersion kDmaBufMinVersion = {0, 3, 24};
|
||||
constexpr PipeWireVersion kDmaBufModifierMinVersion = {0, 3, 33};
|
||||
constexpr PipeWireVersion kDropSingleModifierMinVersion = {0, 3, 40};
|
||||
|
||||
@ -295,10 +294,9 @@ void SharedScreenCastStreamPrivate::OnStreamParamChanged(
|
||||
that->modifier_ =
|
||||
has_modifier ? that->spa_video_format_.modifier : DRM_FORMAT_MOD_INVALID;
|
||||
std::vector<const spa_pod*> params;
|
||||
const int buffer_types =
|
||||
has_modifier || (that->pw_server_version_ >= kDmaBufMinVersion)
|
||||
? (1 << SPA_DATA_DmaBuf) | (1 << SPA_DATA_MemFd)
|
||||
: (1 << SPA_DATA_MemFd);
|
||||
const int buffer_types = has_modifier
|
||||
? (1 << SPA_DATA_DmaBuf) | (1 << SPA_DATA_MemFd)
|
||||
: (1 << SPA_DATA_MemFd);
|
||||
|
||||
params.push_back(reinterpret_cast<spa_pod*>(spa_pod_builder_add_object(
|
||||
&builder, SPA_TYPE_OBJECT_ParamBuffers, SPA_PARAM_Buffers,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user