Merge remote-tracking branch 'src/upstream' into upstream

This commit is contained in:
huheng@kylinos.cn 2022-10-28 11:03:33 +08:00
commit 058a16daad
5 changed files with 24 additions and 12 deletions

View File

@ -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.");

View File

@ -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)
{

View File

@ -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));

View File

@ -128,6 +128,8 @@ private:
QGSettings *m_panelSetting = nullptr;
// outside member
QPointer<BaseDevice> m_device;
bool m_isLoading = false;
QTimer *m_loadTimer = nullptr;
};
#endif // VIDEOFORM_H

View File

@ -14,7 +14,7 @@
<bool>true</bool>
</property>
<property name="windowTitle">
<string>kylin-mobile-assistant</string>
<string>kylin-connectivity</string>
</property>
<property name="windowIcon">
<iconset resource="../../../res/resources.qrc">