Couple of crash fixes.
This commit is contained in:
parent
3bf9a1c70b
commit
ce256161f1
|
@ -35,6 +35,14 @@ Viewport::VideoTile::VideoTile(
|
||||||
Expects(track.track != nullptr);
|
Expects(track.track != nullptr);
|
||||||
Expects(track.row != nullptr);
|
Expects(track.row != nullptr);
|
||||||
|
|
||||||
|
using namespace rpl::mappers;
|
||||||
|
_track.track->stateValue(
|
||||||
|
) | rpl::filter(
|
||||||
|
_1 == Webrtc::VideoState::Paused
|
||||||
|
) | rpl::take(1) | rpl::start_with_next([=] {
|
||||||
|
_wasPaused = true;
|
||||||
|
}, _lifetime);
|
||||||
|
|
||||||
setup(std::move(pinned));
|
setup(std::move(pinned));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -68,11 +76,8 @@ QSize Viewport::VideoTile::PausedVideoSize() {
|
||||||
QSize Viewport::VideoTile::trackOrUserpicSize() const {
|
QSize Viewport::VideoTile::trackOrUserpicSize() const {
|
||||||
if (const auto size = trackSize(); !size.isEmpty()) {
|
if (const auto size = trackSize(); !size.isEmpty()) {
|
||||||
return size;
|
return size;
|
||||||
} else if (_userpicSize.isEmpty()
|
|
||||||
&& _track.track->state() == Webrtc::VideoState::Paused) {
|
|
||||||
_userpicSize = PausedVideoSize();
|
|
||||||
}
|
}
|
||||||
return _userpicSize;
|
return _wasPaused ? PausedVideoSize() : QSize();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Viewport::VideoTile::screencast() const {
|
bool Viewport::VideoTile::screencast() const {
|
||||||
|
|
|
@ -110,12 +110,12 @@ private:
|
||||||
QRect _geometry;
|
QRect _geometry;
|
||||||
TileAnimation _animation;
|
TileAnimation _animation;
|
||||||
rpl::variable<QSize> _trackSize;
|
rpl::variable<QSize> _trackSize;
|
||||||
mutable QSize _userpicSize;
|
|
||||||
QRect _pinOuter;
|
QRect _pinOuter;
|
||||||
QRect _pinInner;
|
QRect _pinInner;
|
||||||
QRect _backOuter;
|
QRect _backOuter;
|
||||||
QRect _backInner;
|
QRect _backInner;
|
||||||
Ui::Animations::Simple _topControlsShownAnimation;
|
Ui::Animations::Simple _topControlsShownAnimation;
|
||||||
|
bool _wasPaused = false;
|
||||||
bool _topControlsShown = false;
|
bool _topControlsShown = false;
|
||||||
bool _pinned = false;
|
bool _pinned = false;
|
||||||
bool _hidden = true;
|
bool _hidden = true;
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit 8d634fc9460569b24186858f9eb65c3e3be97271
|
Subproject commit 8589a8d8501701e1b93f9752abdaf1740e6d0517
|
Loading…
Reference in New Issue