mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-07 23:53:58 +02:00
Start sharing without source choosing in case of PipeWire.
This commit is contained in:
parent
28f83f2af4
commit
e6977b2c33
3 changed files with 12 additions and 3 deletions
|
@ -53,6 +53,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||||
#include "app.h"
|
#include "app.h"
|
||||||
#include "apiwrap.h" // api().kickParticipant.
|
#include "apiwrap.h" // api().kickParticipant.
|
||||||
#include "webrtc/webrtc_video_track.h"
|
#include "webrtc/webrtc_video_track.h"
|
||||||
|
#include "webrtc/webrtc_media_devices.h" // UniqueDesktopCaptureSource.
|
||||||
#include "styles/style_calls.h"
|
#include "styles/style_calls.h"
|
||||||
#include "styles/style_layers.h"
|
#include "styles/style_layers.h"
|
||||||
|
|
||||||
|
@ -1349,7 +1350,15 @@ void Panel::chooseShareScreenSource() {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const auto choose = [=] {
|
const auto choose = [=] {
|
||||||
|
if (const auto source = Webrtc::UniqueDesktopCaptureSource()) {
|
||||||
|
if (_call->isSharingScreen()) {
|
||||||
|
_call->toggleScreenSharing(std::nullopt);
|
||||||
|
} else {
|
||||||
|
chooseSourceAccepted(*source);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
Ui::DesktopCapture::ChooseSource(this);
|
Ui::DesktopCapture::ChooseSource(this);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
const auto screencastFromPeer = [&]() -> PeerData* {
|
const auto screencastFromPeer = [&]() -> PeerData* {
|
||||||
for (const auto &[endpoint, track] : _call->activeVideoTracks()) {
|
for (const auto &[endpoint, track] : _call->activeVideoTracks()) {
|
||||||
|
|
2
Telegram/ThirdParty/tgcalls
vendored
2
Telegram/ThirdParty/tgcalls
vendored
|
@ -1 +1 @@
|
||||||
Subproject commit 98bef190cc1fc18ada3717dd0f97ae79f84d9e45
|
Subproject commit d78c12c9ca0b671d5b0064d44b45e35b37ec2af1
|
|
@ -1 +1 @@
|
||||||
Subproject commit 26ed210ad24f9a25c8f12056489bfd0ede8eac00
|
Subproject commit 45008adcd949f0729c22b098251d5a861eb52373
|
Loading…
Add table
Reference in a new issue