1 /*
2 This file is part of Telegram Desktop,
3 the official desktop application for the Telegram messaging service.
4
5 For license and copyright information please follow this link:
6 https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
7 */
8 #pragma once
9
10 #include "base/weak_ptr.h"
11 #include "base/timer.h"
12 #include "base/bytes.h"
13 #include "mtproto/sender.h"
14 #include "mtproto/mtproto_auth_key.h"
15
16 class History;
17
18 namespace tgcalls {
19 class GroupInstanceCustomImpl;
20 struct GroupLevelsUpdate;
21 struct GroupNetworkState;
22 struct GroupParticipantDescription;
23 class VideoCaptureInterface;
24 } // namespace tgcalls
25
26 namespace base {
27 class GlobalShortcutManager;
28 class GlobalShortcutValue;
29 } // namespace base
30
31 namespace Webrtc {
32 class MediaDevices;
33 class VideoTrack;
34 enum class VideoState;
35 } // namespace Webrtc
36
37 namespace Data {
38 struct LastSpokeTimes;
39 struct GroupCallParticipant;
40 class GroupCall;
41 } // namespace Data
42
43 namespace Calls {
44
45 namespace Group {
46 struct MuteRequest;
47 struct VolumeRequest;
48 struct ParticipantState;
49 struct JoinInfo;
50 struct RejoinEvent;
51 enum class VideoQuality;
52 enum class Error;
53 } // namespace Group
54
55 enum class MuteState {
56 Active,
57 PushToTalk,
58 Muted,
59 ForceMuted,
60 RaisedHand,
61 };
62
MapPushToTalkToActive()63 [[nodiscard]] inline auto MapPushToTalkToActive() {
64 return rpl::map([=](MuteState state) {
65 return (state == MuteState::PushToTalk) ? MuteState::Active : state;
66 });
67 }
68
69 [[nodiscard]] bool IsGroupCallAdmin(
70 not_null<PeerData*> peer,
71 not_null<PeerData*> participantPeer);
72
73 struct LevelUpdate {
74 uint32 ssrc = 0;
75 float value = 0.;
76 bool voice = false;
77 bool me = false;
78 };
79
80 enum class VideoEndpointType {
81 Camera,
82 Screen,
83 };
84
85 struct VideoEndpoint {
86 VideoEndpoint() = default;
VideoEndpointVideoEndpoint87 VideoEndpoint(
88 VideoEndpointType type,
89 not_null<PeerData*> peer,
90 std::string id)
91 : type(type)
92 , peer(peer)
93 , id(std::move(id)) {
94 }
95
96 VideoEndpointType type = VideoEndpointType::Camera;
97 PeerData *peer = nullptr;
98 std::string id;
99
emptyVideoEndpoint100 [[nodiscard]] bool empty() const noexcept {
101 Expects(id.empty() || peer != nullptr);
102
103 return id.empty();
104 }
105 [[nodiscard]] explicit operator bool() const noexcept {
106 return !empty();
107 }
108 };
109
110 inline bool operator==(
111 const VideoEndpoint &a,
112 const VideoEndpoint &b) noexcept {
113 return (a.id == b.id);
114 }
115
116 inline bool operator!=(
117 const VideoEndpoint &a,
118 const VideoEndpoint &b) noexcept {
119 return !(a == b);
120 }
121
122 inline bool operator<(
123 const VideoEndpoint &a,
124 const VideoEndpoint &b) noexcept {
125 return (a.peer < b.peer)
126 || (a.peer == b.peer && a.id < b.id);
127 }
128
129 inline bool operator>(
130 const VideoEndpoint &a,
131 const VideoEndpoint &b) noexcept {
132 return (b < a);
133 }
134
135 inline bool operator<=(
136 const VideoEndpoint &a,
137 const VideoEndpoint &b) noexcept {
138 return !(b < a);
139 }
140
141 inline bool operator>=(
142 const VideoEndpoint &a,
143 const VideoEndpoint &b) noexcept {
144 return !(a < b);
145 }
146
147 struct VideoStateToggle {
148 VideoEndpoint endpoint;
149 bool value = false;
150 };
151
152 struct VideoQualityRequest {
153 VideoEndpoint endpoint;
154 Group::VideoQuality quality = Group::VideoQuality();
155 };
156
157 struct ParticipantVideoParams;
158
159 [[nodiscard]] std::shared_ptr<ParticipantVideoParams> ParseVideoParams(
160 const tl::conditional<MTPGroupCallParticipantVideo> &camera,
161 const tl::conditional<MTPGroupCallParticipantVideo> &screen,
162 const std::shared_ptr<ParticipantVideoParams> &existing);
163
164 [[nodiscard]] const std::string &GetCameraEndpoint(
165 const std::shared_ptr<ParticipantVideoParams> ¶ms);
166 [[nodiscard]] const std::string &GetScreenEndpoint(
167 const std::shared_ptr<ParticipantVideoParams> ¶ms);
168 [[nodiscard]] bool IsCameraPaused(
169 const std::shared_ptr<ParticipantVideoParams> ¶ms);
170 [[nodiscard]] bool IsScreenPaused(
171 const std::shared_ptr<ParticipantVideoParams> ¶ms);
172 [[nodiscard]] uint32 GetAdditionalAudioSsrc(
173 const std::shared_ptr<ParticipantVideoParams> ¶ms);
174
175 class GroupCall final : public base::has_weak_ptr {
176 public:
177 class Delegate {
178 public:
179 virtual ~Delegate() = default;
180
181 virtual void groupCallFinished(not_null<GroupCall*> call) = 0;
182 virtual void groupCallFailed(not_null<GroupCall*> call) = 0;
183 virtual void groupCallRequestPermissionsOrFail(
184 Fn<void()> onSuccess) = 0;
185
186 enum class GroupCallSound {
187 Started,
188 Connecting,
189 AllowedToSpeak,
190 Ended,
191 };
192 virtual void groupCallPlaySound(GroupCallSound sound) = 0;
193 virtual auto groupCallGetVideoCapture(const QString &deviceId)
194 -> std::shared_ptr<tgcalls::VideoCaptureInterface> = 0;
195
196 [[nodiscard]] virtual FnMut<void()> groupCallAddAsyncWaiter() = 0;
197 };
198
199 using GlobalShortcutManager = base::GlobalShortcutManager;
200
201 struct VideoTrack;
202
203 [[nodiscard]] static not_null<PeerData*> TrackPeer(
204 const std::unique_ptr<VideoTrack> &track);
205 [[nodiscard]] static not_null<Webrtc::VideoTrack*> TrackPointer(
206 const std::unique_ptr<VideoTrack> &track);
207 [[nodiscard]] static rpl::producer<QSize> TrackSizeValue(
208 const std::unique_ptr<VideoTrack> &track);
209
210 GroupCall(
211 not_null<Delegate*> delegate,
212 Group::JoinInfo info,
213 const MTPInputGroupCall &inputCall);
214 ~GroupCall();
215
id()216 [[nodiscard]] CallId id() const {
217 return _id;
218 }
peer()219 [[nodiscard]] not_null<PeerData*> peer() const {
220 return _peer;
221 }
joinAs()222 [[nodiscard]] not_null<PeerData*> joinAs() const {
223 return _joinAs.current();
224 }
joinAsValue()225 [[nodiscard]] rpl::producer<not_null<PeerData*>> joinAsValue() const {
226 return _joinAs.value();
227 }
228 [[nodiscard]] bool showChooseJoinAs() const;
scheduleDate()229 [[nodiscard]] TimeId scheduleDate() const {
230 return _scheduleDate;
231 }
232 [[nodiscard]] bool scheduleStartSubscribed() const;
233
234 [[nodiscard]] Data::GroupCall *lookupReal() const;
235 [[nodiscard]] rpl::producer<not_null<Data::GroupCall*>> real() const;
236
237 void start(TimeId scheduleDate);
238 void hangup();
239 void discard();
240 void rejoinAs(Group::JoinInfo info);
241 void rejoinWithHash(const QString &hash);
242 void join(const MTPInputGroupCall &inputCall);
243 void handleUpdate(const MTPUpdate &update);
244 void handlePossibleCreateOrJoinResponse(const MTPDupdateGroupCall &data);
245 void handlePossibleCreateOrJoinResponse(
246 const MTPDupdateGroupCallConnection &data);
247 void changeTitle(const QString &title);
248 void toggleRecording(
249 bool enabled,
250 const QString &title,
251 bool video,
252 bool videoPortrait);
recordingStoppedByMe()253 [[nodiscard]] bool recordingStoppedByMe() const {
254 return _recordingStoppedByMe;
255 }
256 void startScheduledNow();
257 void toggleScheduleStartSubscribed(bool subscribed);
258 void setNoiseSuppression(bool enabled);
259
260 bool emitShareScreenError();
261 bool emitShareCameraError();
262
errors()263 [[nodiscard]] rpl::producer<Group::Error> errors() const {
264 return _errors.events();
265 }
266
267 void addVideoOutput(
268 const std::string &endpoint,
269 not_null<Webrtc::VideoTrack*> track);
270
271 void setMuted(MuteState mute);
272 void setMutedAndUpdate(MuteState mute);
muted()273 [[nodiscard]] MuteState muted() const {
274 return _muted.current();
275 }
mutedValue()276 [[nodiscard]] rpl::producer<MuteState> mutedValue() const {
277 return _muted.value();
278 }
279
280 [[nodiscard]] auto otherParticipantStateValue() const
281 -> rpl::producer<Group::ParticipantState>;
282
283 enum State {
284 Creating,
285 Waiting,
286 Joining,
287 Connecting,
288 Joined,
289 FailedHangingUp,
290 Failed,
291 HangingUp,
292 Ended,
293 };
state()294 [[nodiscard]] State state() const {
295 return _state.current();
296 }
stateValue()297 [[nodiscard]] rpl::producer<State> stateValue() const {
298 return _state.value();
299 }
300
301 enum class InstanceState {
302 Disconnected,
303 TransitionToRtc,
304 Connected,
305 };
instanceState()306 [[nodiscard]] InstanceState instanceState() const {
307 return _instanceState.current();
308 }
instanceStateValue()309 [[nodiscard]] rpl::producer<InstanceState> instanceStateValue() const {
310 return _instanceState.value();
311 }
312
levelUpdates()313 [[nodiscard]] rpl::producer<LevelUpdate> levelUpdates() const {
314 return _levelUpdates.events();
315 }
316 [[nodiscard]] auto videoStreamActiveUpdates() const
317 -> rpl::producer<VideoStateToggle> {
318 return _videoStreamActiveUpdates.events();
319 }
320 [[nodiscard]] auto videoStreamShownUpdates() const
321 -> rpl::producer<VideoStateToggle> {
322 return _videoStreamShownUpdates.events();
323 }
324 void requestVideoQuality(
325 const VideoEndpoint &endpoint,
326 Group::VideoQuality quality);
327
videoEndpointPinned()328 [[nodiscard]] bool videoEndpointPinned() const {
329 return _videoEndpointPinned.current();
330 }
videoEndpointPinnedValue()331 [[nodiscard]] rpl::producer<bool> videoEndpointPinnedValue() const {
332 return _videoEndpointPinned.value();
333 }
334 void pinVideoEndpoint(VideoEndpoint endpoint);
335
336 void showVideoEndpointLarge(VideoEndpoint endpoint);
videoEndpointLarge()337 [[nodiscard]] const VideoEndpoint &videoEndpointLarge() const {
338 return _videoEndpointLarge.current();
339 }
340 [[nodiscard]] auto videoEndpointLargeValue() const
341 -> rpl::producer<VideoEndpoint> {
342 return _videoEndpointLarge.value();
343 }
344 [[nodiscard]] auto activeVideoTracks() const
345 -> const base::flat_map<VideoEndpoint, std::unique_ptr<VideoTrack>> & {
346 return _activeVideoTracks;
347 }
348 [[nodiscard]] auto shownVideoTracks() const
349 -> const base::flat_set<VideoEndpoint> & {
350 return _shownVideoTracks;
351 }
rejoinEvents()352 [[nodiscard]] rpl::producer<Group::RejoinEvent> rejoinEvents() const {
353 return _rejoinEvents.events();
354 }
allowedToSpeakNotifications()355 [[nodiscard]] rpl::producer<> allowedToSpeakNotifications() const {
356 return _allowedToSpeakNotifications.events();
357 }
titleChanged()358 [[nodiscard]] rpl::producer<> titleChanged() const {
359 return _titleChanged.events();
360 }
361 static constexpr auto kSpeakLevelThreshold = 0.2;
362
363 [[nodiscard]] bool mutedByAdmin() const;
364 [[nodiscard]] bool canManage() const;
365 [[nodiscard]] rpl::producer<bool> canManageValue() const;
videoIsWorking()366 [[nodiscard]] bool videoIsWorking() const {
367 return _videoIsWorking.current();
368 }
videoIsWorkingValue()369 [[nodiscard]] rpl::producer<bool> videoIsWorkingValue() const {
370 return _videoIsWorking.value();
371 }
372
373 void setCurrentAudioDevice(bool input, const QString &deviceId);
374 [[nodiscard]] bool isSharingScreen() const;
375 [[nodiscard]] rpl::producer<bool> isSharingScreenValue() const;
376 [[nodiscard]] bool isScreenPaused() const;
377 [[nodiscard]] const std::string &screenSharingEndpoint() const;
378 [[nodiscard]] bool isSharingCamera() const;
379 [[nodiscard]] rpl::producer<bool> isSharingCameraValue() const;
380 [[nodiscard]] bool isCameraPaused() const;
381 [[nodiscard]] const std::string &cameraSharingEndpoint() const;
382 [[nodiscard]] QString screenSharingDeviceId() const;
383 [[nodiscard]] bool screenSharingWithAudio() const;
384 void toggleVideo(bool active);
385 void toggleScreenSharing(
386 std::optional<QString> uniqueId,
387 bool withAudio = false);
388 [[nodiscard]] bool hasVideoWithFrames() const;
389 [[nodiscard]] rpl::producer<bool> hasVideoWithFramesValue() const;
390
391 void toggleMute(const Group::MuteRequest &data);
392 void changeVolume(const Group::VolumeRequest &data);
393 std::variant<int, not_null<UserData*>> inviteUsers(
394 const std::vector<not_null<UserData*>> &users);
395
396 std::shared_ptr<GlobalShortcutManager> ensureGlobalShortcutManager();
397 void applyGlobalShortcutChanges();
398
399 void pushToTalk(bool pressed, crl::time delay);
400 void setNotRequireARGB32();
401
lifetime()402 [[nodiscard]] rpl::lifetime &lifetime() {
403 return _lifetime;
404 }
405
406 private:
407 class LoadPartTask;
408 class MediaChannelDescriptionsTask;
409 using GlobalShortcutValue = base::GlobalShortcutValue;
410 using Error = Group::Error;
411 struct SinkPointer;
412
413 static constexpr uint32 kDisabledSsrc = uint32(-1);
414
415 struct LoadingPart {
416 std::shared_ptr<LoadPartTask> task;
417 mtpRequestId requestId = 0;
418 };
419
420 enum class FinishType {
421 None,
422 Ended,
423 Failed,
424 };
425 enum class InstanceMode {
426 None,
427 Rtc,
428 Stream,
429 };
430 enum class SendUpdateType {
431 Mute = 0x01,
432 RaiseHand = 0x02,
433 CameraStopped = 0x04,
434 CameraPaused = 0x08,
435 ScreenPaused = 0x10,
436 };
437 enum class JoinAction {
438 None,
439 Joining,
440 Leaving,
441 };
442 struct JoinState {
443 uint32 ssrc = 0;
444 JoinAction action = JoinAction::None;
445 bool nextActionPending = false;
446
447 void finish(uint32 updatedSsrc = 0) {
448 action = JoinAction::None;
449 ssrc = updatedSsrc;
450 }
451 };
452
is_flag_type(SendUpdateType)453 friend inline constexpr bool is_flag_type(SendUpdateType) {
454 return true;
455 }
456
457 void broadcastPartStart(std::shared_ptr<LoadPartTask> task);
458 void broadcastPartCancel(not_null<LoadPartTask*> task);
459 void mediaChannelDescriptionsStart(
460 std::shared_ptr<MediaChannelDescriptionsTask> task);
461 void mediaChannelDescriptionsCancel(
462 not_null<MediaChannelDescriptionsTask*> task);
463 [[nodiscard]] int64 approximateServerTimeInMs() const;
464
465 [[nodiscard]] bool mediaChannelDescriptionsFill(
466 not_null<MediaChannelDescriptionsTask*> task,
467 Fn<bool(uint32)> resolved = nullptr);
468 void checkMediaChannelDescriptions(Fn<bool(uint32)> resolved = nullptr);
469
470 void handlePossibleCreateOrJoinResponse(const MTPDgroupCall &data);
471 void handlePossibleDiscarded(const MTPDgroupCallDiscarded &data);
472 void handleUpdate(const MTPDupdateGroupCall &data);
473 void handleUpdate(const MTPDupdateGroupCallParticipants &data);
474 bool tryCreateController();
475 void destroyController();
476 bool tryCreateScreencast();
477 void destroyScreencast();
478
479 void emitShareCameraError(Error error);
480 void emitShareScreenError(Error error);
481
482 void setState(State state);
483 void finish(FinishType type);
484 void maybeSendMutedUpdate(MuteState previous);
485 void sendSelfUpdate(SendUpdateType type);
486 void updateInstanceMuteState();
487 void updateInstanceVolumes();
488 void updateInstanceVolume(
489 const std::optional<Data::GroupCallParticipant> &was,
490 const Data::GroupCallParticipant &now);
491 void applyMeInCallLocally();
492 void rejoin();
493 void leave();
494 void rejoin(not_null<PeerData*> as);
495 void setJoinAs(not_null<PeerData*> as);
496 void saveDefaultJoinAs(not_null<PeerData*> as);
497 void subscribeToReal(not_null<Data::GroupCall*> real);
498 void setScheduledDate(TimeId date);
499 void rejoinPresentation();
500 void leavePresentation();
501 void checkNextJoinAction();
502
503 void audioLevelsUpdated(const tgcalls::GroupLevelsUpdate &data);
504 void setInstanceConnected(tgcalls::GroupNetworkState networkState);
505 void setInstanceMode(InstanceMode mode);
506 void setScreenInstanceConnected(tgcalls::GroupNetworkState networkState);
507 void setScreenInstanceMode(InstanceMode mode);
508 void checkLastSpoke();
509 void pushToTalkCancel();
510
511 void checkGlobalShortcutAvailability();
512 void checkJoined();
513 void checkFirstTimeJoined();
514 void notifyAboutAllowedToSpeak();
515
516 void playConnectingSound();
517 void stopConnectingSound();
518 void playConnectingSoundOnce();
519
520 void updateRequestedVideoChannels();
521 void updateRequestedVideoChannelsDelayed();
522 void fillActiveVideoEndpoints();
523
524 void editParticipant(
525 not_null<PeerData*> participantPeer,
526 bool mute,
527 std::optional<int> volume);
528 void applyParticipantLocally(
529 not_null<PeerData*> participantPeer,
530 bool mute,
531 std::optional<int> volume);
532 void applyQueuedSelfUpdates();
533 void sendPendingSelfUpdates();
534 void applySelfUpdate(const MTPDgroupCallParticipant &data);
535 void applyOtherParticipantUpdate(const MTPDgroupCallParticipant &data);
536
537 void setupMediaDevices();
538 void setupOutgoingVideo();
539 void setScreenEndpoint(std::string endpoint);
540 void setCameraEndpoint(std::string endpoint);
541 void addVideoOutput(const std::string &endpoint, SinkPointer sink);
542 void setVideoEndpointLarge(VideoEndpoint endpoint);
543
544 void markEndpointActive(
545 VideoEndpoint endpoint,
546 bool active,
547 bool paused);
548 void markTrackPaused(const VideoEndpoint &endpoint, bool paused);
549 void markTrackShown(const VideoEndpoint &endpoint, bool shown);
550
551 [[nodiscard]] int activeVideoSendersCount() const;
552
553 [[nodiscard]] MTPInputGroupCall inputCall() const;
554
555 const not_null<Delegate*> _delegate;
556 not_null<PeerData*> _peer; // Can change in legacy group migration.
557 rpl::event_stream<PeerData*> _peerStream;
558 not_null<History*> _history; // Can change in legacy group migration.
559 MTP::Sender _api;
560 rpl::event_stream<not_null<Data::GroupCall*>> _realChanges;
561 rpl::variable<State> _state = State::Creating;
562 base::flat_set<uint32> _unresolvedSsrcs;
563 rpl::event_stream<Error> _errors;
564 bool _recordingStoppedByMe = false;
565 bool _requestedVideoChannelsUpdateScheduled = false;
566
567 MTP::DcId _broadcastDcId = 0;
568 base::flat_map<not_null<LoadPartTask*>, LoadingPart> _broadcastParts;
569 base::flat_set<
570 std::shared_ptr<
571 MediaChannelDescriptionsTask>,
572 base::pointer_comparator<
573 MediaChannelDescriptionsTask>> _mediaChannelDescriptionses;
574
575 rpl::variable<not_null<PeerData*>> _joinAs;
576 std::vector<not_null<PeerData*>> _possibleJoinAs;
577 QString _joinHash;
578 int64 _serverTimeMs = 0;
579 crl::time _serverTimeMsGotAt = 0;
580
581 rpl::variable<MuteState> _muted = MuteState::Muted;
582 rpl::variable<bool> _canManage = false;
583 rpl::variable<bool> _videoIsWorking = false;
584 bool _initialMuteStateSent = false;
585 bool _acceptFields = false;
586
587 rpl::event_stream<Group::ParticipantState> _otherParticipantStateValue;
588 std::vector<MTPGroupCallParticipant> _queuedSelfUpdates;
589
590 CallId _id = 0;
591 CallId _accessHash = 0;
592 JoinState _joinState;
593 JoinState _screenJoinState;
594 std::string _cameraEndpoint;
595 std::string _screenEndpoint;
596 TimeId _scheduleDate = 0;
597 base::flat_set<uint32> _mySsrcs;
598 mtpRequestId _createRequestId = 0;
599 mtpRequestId _selfUpdateRequestId = 0;
600
601 rpl::variable<InstanceState> _instanceState
602 = InstanceState::Disconnected;
603 bool _instanceTransitioning = false;
604 InstanceMode _instanceMode = InstanceMode::None;
605 std::unique_ptr<tgcalls::GroupInstanceCustomImpl> _instance;
606 base::has_weak_ptr _instanceGuard;
607 std::shared_ptr<tgcalls::VideoCaptureInterface> _cameraCapture;
608 rpl::variable<Webrtc::VideoState> _cameraState;
609 rpl::variable<bool> _isSharingCamera = false;
610 base::flat_map<std::string, SinkPointer> _pendingVideoOutputs;
611
612 rpl::variable<InstanceState> _screenInstanceState
613 = InstanceState::Disconnected;
614 InstanceMode _screenInstanceMode = InstanceMode::None;
615 std::unique_ptr<tgcalls::GroupInstanceCustomImpl> _screenInstance;
616 base::has_weak_ptr _screenInstanceGuard;
617 std::shared_ptr<tgcalls::VideoCaptureInterface> _screenCapture;
618 rpl::variable<Webrtc::VideoState> _screenState;
619 rpl::variable<bool> _isSharingScreen = false;
620 QString _screenDeviceId;
621 bool _screenWithAudio = false;
622
623 base::flags<SendUpdateType> _pendingSelfUpdates;
624 bool _requireARGB32 = true;
625
626 rpl::event_stream<LevelUpdate> _levelUpdates;
627 rpl::event_stream<VideoStateToggle> _videoStreamActiveUpdates;
628 rpl::event_stream<VideoStateToggle> _videoStreamPausedUpdates;
629 rpl::event_stream<VideoStateToggle> _videoStreamShownUpdates;
630 base::flat_map<
631 VideoEndpoint,
632 std::unique_ptr<VideoTrack>> _activeVideoTracks;
633 base::flat_set<VideoEndpoint> _shownVideoTracks;
634 rpl::variable<VideoEndpoint> _videoEndpointLarge;
635 rpl::variable<bool> _videoEndpointPinned = false;
636 crl::time _videoLargeTillTime = 0;
637 base::flat_map<uint32, Data::LastSpokeTimes> _lastSpoke;
638 rpl::event_stream<Group::RejoinEvent> _rejoinEvents;
639 rpl::event_stream<> _allowedToSpeakNotifications;
640 rpl::event_stream<> _titleChanged;
641 base::Timer _lastSpokeCheckTimer;
642 base::Timer _checkJoinedTimer;
643
644 crl::time _lastSendProgressUpdate = 0;
645
646 std::shared_ptr<GlobalShortcutManager> _shortcutManager;
647 std::shared_ptr<GlobalShortcutValue> _pushToTalk;
648 base::Timer _pushToTalkCancelTimer;
649 base::Timer _connectingSoundTimer;
650 bool _hadJoinedState = false;
651
652 std::unique_ptr<Webrtc::MediaDevices> _mediaDevices;
653 QString _audioInputId;
654 QString _audioOutputId;
655 QString _cameraInputId;
656
657 rpl::lifetime _lifetime;
658
659 };
660
661 } // namespace Calls
662