Fix one-way video calls
This commit is contained in:
parent
7124024977
commit
459c59901e
4 changed files with 27 additions and 2 deletions
|
|
@ -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);
|
||||
|
|
@ -1152,6 +1155,19 @@ WebRTCSession::addVideoPipeline(int vp8PayloadType)
|
|||
return true;
|
||||
}
|
||||
|
||||
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
|
||||
{
|
||||
|
|
@ -1326,6 +1342,12 @@ WebRTCSession::havePlugins(bool, std::string *)
|
|||
return false;
|
||||
}
|
||||
|
||||
bool
|
||||
WebRTCSession::haveLocalVideo() const
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
bool
|
||||
WebRTCSession::createOffer(bool)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue