sipcall: fix rotation

Change-Id: I96bea87e43cf08ddf0b2805f13d35c3efa6c2db7
parent 46367dfb
......@@ -530,6 +530,8 @@ void
VideoRtpSession::setChangeOrientationCallback(std::function<void(int)> cb)
{
changeOrientationCallback_ = std::move(cb);
if (sender_)
sender_->setChangeOrientationCallback(changeOrientationCallback_);
}
float
......
......@@ -912,6 +912,15 @@ SIPCall::startAllMedia()
bool peer_holding {true};
int slotN = -1;
#ifdef ENABLE_VIDEO
videortp_->setChangeOrientationCallback([wthis = weak()] (int angle) {
runOnMainThread([wthis, angle] {
if (auto this_ = wthis.lock())
this_->setVideoOrientation(angle);
});
});
#endif
for (const auto& slot : slots) {
++slotN;
const auto& local = slot.first;
......@@ -998,12 +1007,6 @@ SIPCall::startAllMedia()
this_->requestKeyframe();
});
});
videortp_->setChangeOrientationCallback([wthis = weak()] (int angle) {
runOnMainThread([wthis, angle] {
if (auto this_ = wthis.lock())
this_->setVideoOrientation(angle);
});
});
#endif
if (not isSubcall() and peerHolding_ != peer_holding) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment