-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: modify the default video format for recording to webm
For some hardware, modify the default video format for recording to webm Log: For some hardware, modify the default video format for recording to webm Bug: https://pms.uniontech.com/bug-view-227831.html
- Loading branch information
1 parent
44f0a2e
commit 43704bf
Showing
5 changed files
with
103 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
// Copyright (C) 2020 ~ 2021 Uniontech Software Technology Co.,Ltd. | ||
// SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd. | ||
// | ||
// SPDX-License-Identifier: GPL-3.0-or-later | ||
|
||
#include "globalutils.h" | ||
|
||
#include <QDebug> | ||
#include <QtDBus> | ||
#include <QDBusInterface> | ||
#include <QDBusArgument> | ||
#include <QDBusReply> | ||
|
||
struct DMIInfo { | ||
QString biosManufacturer; | ||
QString biosVersion; | ||
QString biosRelease; | ||
QString productName; | ||
QString serialNumber; | ||
QString Manufacturer; | ||
QString version; | ||
QString sysProductName; | ||
QString Family; | ||
QString sysSerialNumber; | ||
QString sysUUID; | ||
}; | ||
Q_DECLARE_METATYPE(DMIInfo) | ||
|
||
// Marshall the MyStructure data into a D-Bus argument | ||
QDBusArgument &operator<<(QDBusArgument &argument, const DMIInfo &mystruct) | ||
{ | ||
argument.beginStructure(); | ||
argument << mystruct.biosManufacturer << mystruct.biosVersion << mystruct.biosRelease << mystruct.productName | ||
<< mystruct.serialNumber << mystruct.Manufacturer << mystruct.version << mystruct.sysProductName | ||
<< mystruct.Family << mystruct.sysSerialNumber << mystruct.sysUUID; | ||
argument.endStructure(); | ||
return argument; | ||
} | ||
|
||
// Retrieve the MyStructure data from the D-Bus argument | ||
const QDBusArgument &operator>>(const QDBusArgument &argument, DMIInfo &mystruct) | ||
{ | ||
argument.beginStructure(); | ||
argument >> mystruct.biosManufacturer >> mystruct.biosVersion >> mystruct.biosRelease >> mystruct.productName | ||
>> mystruct.serialNumber >> mystruct.Manufacturer >> mystruct.version >> mystruct.sysProductName | ||
>> mystruct.Family >> mystruct.sysSerialNumber >> mystruct.sysUUID; | ||
argument.endStructure(); | ||
return argument; | ||
} | ||
|
||
bool GlobalUtils::isBXCBoard() | ||
{ | ||
qDBusRegisterMetaType<DMIInfo>(); | ||
QDBusInterface *monitorInterface = new QDBusInterface("com.deepin.system.SystemInfo", "/com/deepin/system/SystemInfo", "org.freedesktop.DBus.Properties", QDBusConnection::systemBus()); | ||
if (!monitorInterface->isValid()) | ||
return false; | ||
|
||
DMIInfo dmiInfo; | ||
QDBusReply<QDBusVariant> replay = monitorInterface->call("Get", "com.deepin.system.SystemInfo", "DMIInfo"); | ||
|
||
replay.value().variant().value<QDBusArgument>() >> dmiInfo; | ||
|
||
qDebug() << __func__ << "dmiInfo.productName: " << dmiInfo.productName; | ||
if (dmiInfo.productName.contains("600F") || dmiInfo.productName.contains("NZ275D")) { | ||
return true; | ||
} else { | ||
return false; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
// Copyright (C) 2020 ~ 2021 Uniontech Software Technology Co.,Ltd. | ||
// SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd. | ||
// | ||
// SPDX-License-Identifier: GPL-3.0-or-later | ||
|
||
#ifndef GLOBALUTILS_H | ||
#define GLOBALUTILS_H | ||
|
||
#include <QString> | ||
|
||
class GlobalUtils | ||
{ | ||
public: | ||
static bool isBXCBoard(); | ||
}; | ||
|
||
#endif // GLOBALUTILS_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters