Commit 53971615 authored by Edric Milaret's avatar Edric Milaret Committed by Stepan Salenikovich

settings: fix video not showing on settings panel

Refs #77657

Change-Id: I4f9cf419f20f79e394ac9cde62ea4ee3fc665e25
parent d9844072
......@@ -42,13 +42,11 @@ VideoWidget::~VideoWidget()
void
VideoWidget::previewStarted(Video::Renderer *renderer) {
if (this->isVisible()) {
previewRenderer_ = renderer;
connect(previewRenderer_, SIGNAL(frameUpdated()),
this, SLOT(frameFromPreview()));
connect(previewRenderer_, SIGNAL(stopped()),
this, SLOT(previewStopped()));
}
previewRenderer_ = renderer;
connect(previewRenderer_, SIGNAL(frameUpdated()),
this, SLOT(frameFromPreview()));
connect(previewRenderer_, SIGNAL(stopped()),
this, SLOT(previewStopped()));
}
void
......@@ -75,7 +73,7 @@ VideoWidget::paintEvent(QPaintEvent *evt) {
if (renderer_ && currentDistantFrame_) {
const QSize imgSize(renderer_->size());
QImage distantFrame(currentDistantFrame_.get()->data(),
imgSize.width(), imgSize.height(), QImage::Format_ARGB32_Premultiplied);
imgSize.width(), imgSize.height(), QImage::Format_ARGB32_Premultiplied);
auto scaledDistant = distantFrame.scaled(size(), Qt::KeepAspectRatio);
auto xDiff = (width() - scaledDistant.width()) / 2;
auto yDiff = (height() - scaledDistant.height()) /2;
......@@ -102,12 +100,10 @@ VideoWidget::paintEvent(QPaintEvent *evt) {
void
VideoWidget::callInitiated(Call* call, Video::Renderer *renderer) {
Q_UNUSED(call)
if (this->isVisible()) {
renderer_ = renderer;
connect(renderer_, SIGNAL(frameUpdated()), this, SLOT(frameFromDistant()));
connect(renderer_, SIGNAL(stopped()),this, SLOT(renderingStopped()),
Qt::ConnectionType::DirectConnection);
}
renderer_ = renderer;
connect(renderer_, SIGNAL(frameUpdated()), this, SLOT(frameFromDistant()));
connect(renderer_, SIGNAL(stopped()),this, SLOT(renderingStopped()),
Qt::ConnectionType::DirectConnection);
}
void
......
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