summary refs log tree commit diff
path: root/src/WebRTCSession.cpp
diff options
context:
space:
mode:
authortrilene <trilene@runbox.com>2020-12-17 12:45:54 -0500
committerNicolas Werner <nicolas.werner@hotmail.de>2021-01-07 14:04:21 +0100
commit459c59901e85d5ac4e04b48ba68a046142ea5bf8 (patch)
tree8064783d2d6b0303dae36d4b99dfb4ba5e70ac84 /src/WebRTCSession.cpp
parentMake call invites less intrusive (diff)
downloadnheko-459c59901e85d5ac4e04b48ba68a046142ea5bf8.tar.xz
Fix one-way video calls
Diffstat (limited to 'src/WebRTCSession.cpp')
-rw-r--r--src/WebRTCSession.cpp24
1 files changed, 23 insertions, 1 deletions
diff --git a/src/WebRTCSession.cpp b/src/WebRTCSession.cpp

index 90a693a4..a431ab54 100644 --- a/src/WebRTCSession.cpp +++ b/src/WebRTCSession.cpp
@@ -555,7 +555,10 @@ getResolution(GstPad *pad) void addCameraView(GstElement *pipe, const std::pair<int, int> &videoCallSize) { - GstElement *tee = gst_bin_get_by_name(GST_BIN(pipe), "videosrctee"); + GstElement *tee = gst_bin_get_by_name(GST_BIN(pipe), "videosrctee"); + if (!tee) + return; + GstElement *queue = gst_element_factory_make("queue", nullptr); GstElement *videorate = gst_element_factory_make("videorate", nullptr); gst_bin_add_many(GST_BIN(pipe), queue, videorate, nullptr); @@ -1153,6 +1156,19 @@ WebRTCSession::addVideoPipeline(int vp8PayloadType) } bool +WebRTCSession::haveLocalVideo() const +{ + if (isVideo_ && state_ >= State::INITIATED) { + GstElement *tee = gst_bin_get_by_name(GST_BIN(pipe_), "videosrctee"); + if (tee) { + gst_object_unref(tee); + return true; + } + } + return false; +} + +bool WebRTCSession::isMicMuted() const { if (state_ < State::INITIATED) @@ -1327,6 +1343,12 @@ WebRTCSession::havePlugins(bool, std::string *) } bool +WebRTCSession::haveLocalVideo() const +{ + return false; +} + +bool WebRTCSession::createOffer(bool) { return false;