mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-19 07:37:11 +02:00
Fix video between tdesktop instances.
This commit is contained in:
parent
12e0399cf4
commit
815300bffc
5 changed files with 14 additions and 15 deletions
|
@ -23,11 +23,12 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|||
#include "media/audio/media_audio_track.h"
|
||||
#include "base/platform/base_platform_info.h"
|
||||
#include "calls/calls_panel.h"
|
||||
#include "webrtc/webrtc_video_sink.h"
|
||||
#include "data/data_user.h"
|
||||
#include "data/data_session.h"
|
||||
#include "facades.h"
|
||||
|
||||
#include "tgcalls/Instance.h"
|
||||
#include <tgcalls/Instance.h>
|
||||
|
||||
namespace tgcalls {
|
||||
class InstanceImpl;
|
||||
|
@ -706,6 +707,8 @@ void Call::createAndStartController(const MTPDphoneCall &call) {
|
|||
return static_cast<uint8_t>(byte);
|
||||
}) | ranges::to_vector;
|
||||
|
||||
descriptor.videoCapture = tgcalls::CreateVideoCapture();
|
||||
|
||||
const auto version = call.vprotocol().match([&](
|
||||
const MTPDphoneCallProtocol &data) {
|
||||
return data.vlibrary_versions().v;
|
||||
|
@ -729,7 +732,11 @@ void Call::createAndStartController(const MTPDphoneCall &call) {
|
|||
raw->setMuteMicrophone(_mute);
|
||||
}
|
||||
const auto &settings = Core::App().settings();
|
||||
//raw->setIncomingVideoOutput(std::make_shared<rtc::VideoSinkInterface<webrtc::VideoFrame>>())
|
||||
raw->setIncomingVideoOutput(webrtc::CreateVideoSink([=](QImage frame) {
|
||||
crl::on_main(weak, [=] {
|
||||
_frames.fire_copy(frame);
|
||||
});
|
||||
}));
|
||||
raw->setAudioOutputDevice(
|
||||
settings.callOutputDeviceID().toStdString());
|
||||
raw->setAudioInputDevice(
|
||||
|
|
2
Telegram/ThirdParty/tgcalls
vendored
2
Telegram/ThirdParty/tgcalls
vendored
|
@ -1 +1 @@
|
|||
Subproject commit ccba258805478783804cf273ff8c5edffd9f009a
|
||||
Subproject commit f7b3ad47df96bacf50bd958065d4d7d2901d9cfb
|
|
@ -5,7 +5,7 @@
|
|||
# https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
|
||||
add_library(lib_tgcalls STATIC)
|
||||
init_target(lib_tgcalls)
|
||||
init_target(lib_tgcalls cxx_std_14)
|
||||
add_library(tdesktop::lib_tgcalls ALIAS lib_tgcalls)
|
||||
|
||||
set(tgcalls_dir ${third_party_loc}/tgcalls)
|
||||
|
@ -80,7 +80,7 @@ PRIVATE
|
|||
)
|
||||
|
||||
add_library(lib_tgcalls_legacy STATIC)
|
||||
init_target(lib_tgcalls_legacy)
|
||||
init_target(lib_tgcalls_legacy cxx_std_14)
|
||||
add_library(tdesktop::lib_tgcalls_legacy ALIAS lib_tgcalls_legacy)
|
||||
|
||||
nice_target_sources(lib_tgcalls_legacy ${tgcalls_loc}
|
||||
|
|
|
@ -14,17 +14,9 @@ if (TDESKTOP_USE_PACKAGED_TGVOIP AND NOT DESKTOP_APP_USE_PACKAGED_LAZY)
|
|||
target_link_libraries(lib_tgvoip INTERFACE PkgConfig::TGVOIP)
|
||||
else()
|
||||
add_library(lib_tgvoip STATIC)
|
||||
init_target(lib_tgvoip)
|
||||
init_target(lib_tgvoip cxx_std_14)
|
||||
add_library(tdesktop::lib_tgvoip ALIAS lib_tgvoip)
|
||||
|
||||
if (NOT APPLE)
|
||||
# On macOS if you build libtgvoip with C++17 it uses std::optional
|
||||
# instead of absl::optional and when it uses optional::value, the
|
||||
# build fails, because optional::value is available starting with
|
||||
# macOS 10.14+. This way we force using absl::optional.
|
||||
target_compile_features(lib_tgvoip PUBLIC cxx_std_17)
|
||||
endif()
|
||||
|
||||
set(tgvoip_loc ${third_party_loc}/libtgvoip)
|
||||
|
||||
nice_target_sources(lib_tgvoip ${tgvoip_loc}
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit d3d96130ba245e985c79c9040459b548416efdf8
|
||||
Subproject commit 078f6bf15d60c23f9907d91398bfd6bf201638be
|
Loading…
Add table
Reference in a new issue