diff --git a/dsoftbus/dsoftbus_build/foundation/communication/dsoftbus/sdk/frame/common/src/softbus_client_frame_manager.c b/dsoftbus/dsoftbus_build/foundation/communication/dsoftbus/sdk/frame/common/src/softbus_client_frame_manager.c index 166e89a..662ba97 100644 --- a/dsoftbus/dsoftbus_build/foundation/communication/dsoftbus/sdk/frame/common/src/softbus_client_frame_manager.c +++ b/dsoftbus/dsoftbus_build/foundation/communication/dsoftbus/sdk/frame/common/src/softbus_client_frame_manager.c @@ -72,7 +72,7 @@ ERR_EXIT: return SOFTBUS_ERR; } -int32_t InitSoftBus(const char *pkgName) +int32_t InitSoftBus(const char *pkgName)kyl { if (pkgName == NULL || strlen(pkgName) >= PKG_NAME_SIZE_MAX) { SoftBusLog(SOFTBUS_LOG_COMM, SOFTBUS_LOG_ERROR, "init softbus sdk fail."); diff --git a/projection/device/basedevice.cpp b/projection/device/basedevice.cpp index 064248d..660b9dc 100644 --- a/projection/device/basedevice.cpp +++ b/projection/device/basedevice.cpp @@ -25,7 +25,7 @@ extern "C" } const std::string SNDCPYPATH = "/usr/share/kylin-mobile-assistant/sndcpy "; -const std::string LOGPATH = "~/.log/kylin-mobile-assistant.log"; +const std::string LOGPATH = "~/.log/kylin-connectivity.log"; BaseDevice::BaseDevice(DeviceParams params, QObject *parent) : QObject(parent) { diff --git a/projection/device/deviceui/videoform.cpp b/projection/device/deviceui/videoform.cpp index e85082a..c9b661b 100644 --- a/projection/device/deviceui/videoform.cpp +++ b/projection/device/deviceui/videoform.cpp @@ -84,6 +84,7 @@ void VideoForm::initUI() m_videoWidget->setMouseTracking(true); ui->keepRatioWidget->setMouseTracking(true); m_titleHeight = TITLE_HEIGHT; + m_loadTimer = new QTimer(this); } void VideoForm::initConnect() @@ -92,10 +93,14 @@ void VideoForm::initConnect() connect(ui->title, &VideoTitle::sigMaxButtonClicked, this, &VideoForm::onMaxButtonClick); connect(ui->title, &VideoTitle::sigFullScreen, this, &VideoForm::onFullScreen); connect(ui->title, &VideoTitle::sigScroll, this, &VideoForm::onScrollTrigger); + connect(m_loadTimer, &QTimer::timeout, this, [this](){ + m_isLoading = true; + }); } void VideoForm::deleteUI() { + m_isLoading = false; this->hide(); if (!m_device) { return; @@ -124,18 +129,23 @@ const QSize &VideoForm::frameSize() void VideoForm::updateRender(const AVFrame *frame) { - - if (m_videoWidget->isHidden()) { this->show(); - updateShowSize(QSize(frame->width, frame->height)); - m_loadingWidget->resize(this->size()); - m_loadingWidget->show(); - GenerateTools::delayMs(1000); - if (m_loadingWidget) { - m_loadingWidget->close(); + if (m_loadTimer) { + m_loadTimer->start(500); } - m_videoWidget->show(); + updateShowSize(QSize(frame->width, frame->height)); + if (m_isLoading) { + if (m_loadingWidget) { + m_loadingWidget->close(); + } + m_videoWidget->show(); + } else { + m_loadingWidget->resize(this->size()); + m_loadingWidget->show(); + } + + } updateShowSize(QSize(frame->width, frame->height)); diff --git a/projection/device/deviceui/videoform.h b/projection/device/deviceui/videoform.h index 67046c2..789c36f 100644 --- a/projection/device/deviceui/videoform.h +++ b/projection/device/deviceui/videoform.h @@ -128,6 +128,8 @@ private: QGSettings *m_panelSetting = nullptr; // outside member QPointer m_device; + bool m_isLoading = false; + QTimer *m_loadTimer = nullptr; }; #endif // VIDEOFORM_H diff --git a/projection/device/deviceui/videoform.ui b/projection/device/deviceui/videoform.ui index 7e0a38d..aad5b71 100644 --- a/projection/device/deviceui/videoform.ui +++ b/projection/device/deviceui/videoform.ui @@ -14,7 +14,7 @@ true - kylin-mobile-assistant + kylin-connectivity