Commit bcf24e9f authored by Kateryna Kostiuk's avatar Kateryna Kostiuk Committed by Andreas Traczyk

call view: update layer

After pausing and unpausing call OpenGL layer was not updated that
was causing crash.

Change-Id: Id280f8a116f7eaa23f8e9dcd9690a4f582e25dba
Reviewed-by: Andreas Traczyk's avatarAndreas Traczyk <andreas.traczyk@savoirfairelinux.com>
parent e2c4e087
......@@ -462,7 +462,7 @@
if (callModel->hasCall(callUid_)) {
if (auto renderer = callModel->getRenderer(callUid_)) {
QObject::disconnect(self.videoStarted);
[videoView setLayer:[[CallLayer alloc] init]];
//[videoView setLayer:[[CallLayer alloc] init]];
[self connectVideoRenderer: renderer];
}
}
......@@ -520,6 +520,9 @@
videoHolder.started = QObject::connect(renderer,
&Video::Renderer::started,
[=]() {
if (![videoView.layer isKindOfClass:[CallLayer class]]) {
[videoView setLayer:[[CallLayer alloc] init]];
}
[self mouseIsMoving: NO];
[videoView setShouldAcceptInteractions:YES];
QObject::disconnect(videoHolder.frameUpdated);
......@@ -581,9 +584,10 @@
return;
CallLayer* callLayer = (CallLayer*) view.layer;
[callLayer setCurrentFrame:std::move(frame_ptr)];
[callLayer setVideoRunning:YES];
if ([callLayer respondsToSelector:@selector(setCurrentFrame:)]) {
[callLayer setCurrentFrame:std::move(frame_ptr)];
[callLayer setVideoRunning:YES];
}
}
- (void) initFrame
......
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