Merge pull request #148 from barry-ran/dev

Dev
This commit is contained in:
Barry 2020-04-25 16:36:14 +08:00 committed by GitHub
commit 06e77ad51e
20 changed files with 220 additions and 86 deletions

13
.github/FUNDING.yml vendored Normal file
View file

@ -0,0 +1,13 @@
# These are supported funding model platforms
github: barry-ran
patreon: # Replace with a single Patreon username
open_collective: QtScrcpy
ko_fi: # Replace with a single Ko-fi username
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
liberapay: # Replace with a single Liberapay username
issuehunt: # Replace with a single IssueHunt username
otechie: # Replace with a single Otechie username
custom: ["https://paypal.me/QtScrcpy", "https://gitee.com/Barryda/MyPictureBed/blob/master/QtScrcpy/payme.md"]

View file

@ -40,6 +40,7 @@ void FpsCounter::timerEvent(QTimerEvent *event)
m_curRendered = m_rendered;
m_curSkipped = m_skipped;
resetCounter();
emit updateFPS(m_curRendered);
//qInfo("FPS:%d Discard:%d", m_curRendered, m_skipped);
}
}

View file

@ -15,6 +15,9 @@ public:
void addRenderedFrame();
void addSkippedFrame();
signals:
void updateFPS(quint32 fps);
protected:
virtual void timerEvent(QTimerEvent *event);

View file

@ -115,6 +115,11 @@ void VideoBuffer::interrupt()
}
}
FpsCounter *VideoBuffer::getFPSCounter()
{
return &m_fpsCounter;
}
void VideoBuffer::swap()
{
AVFrame *tmp = m_decodingFrame;

View file

@ -37,6 +37,8 @@ public:
// wake up and avoid any blocking call
void interrupt();
FpsCounter *getFPSCounter();
private:
void swap();

View file

@ -277,6 +277,7 @@ void Device::initSignals()
m_vb->unLock();
},
Qt::QueuedConnection);
connect(m_vb->getFPSCounter(), &::FpsCounter::updateFPS, m_videoForm, &VideoForm::updateFPS);
}
}

View file

@ -1,5 +1,6 @@
#include <QDesktopWidget>
#include <QFileInfo>
#include <QLabel>
#include <QMessageBox>
#include <QMimeData>
#include <QMouseEvent>
@ -68,6 +69,16 @@ void VideoForm::initUI()
ui->keepRadioWidget->setWidget(m_videoWidget);
ui->keepRadioWidget->setWidthHeightRadio(m_widthHeightRatio);
m_fpsLabel = new QLabel(m_videoWidget);
QFont ft;
ft.setPointSize(15);
ft.setWeight(QFont::Light);
ft.setBold(true);
m_fpsLabel->setFont(ft);
m_fpsLabel->move(5, 15);
m_fpsLabel->setMinimumWidth(100);
m_fpsLabel->setStyleSheet(R"(QLabel {color: #00FF00;})");
setMouseTracking(true);
m_videoWidget->setMouseTracking(true);
ui->keepRadioWidget->setMouseTracking(true);
@ -115,6 +126,14 @@ void VideoForm::removeBlackRect()
resize(ui->keepRadioWidget->goodSize());
}
void VideoForm::showFPS(bool show)
{
if (!m_fpsLabel) {
return;
}
m_fpsLabel->setVisible(show);
}
void VideoForm::updateRender(const AVFrame *frame)
{
if (m_videoWidget->isHidden()) {
@ -429,6 +448,15 @@ void VideoForm::onSwitchFullScreen()
}
}
void VideoForm::updateFPS(quint32 fps)
{
qDebug() << "FPS:" << fps;
if (!m_fpsLabel) {
return;
}
m_fpsLabel->setText(QString("FPS:%1").arg(fps));
}
void VideoForm::staysOnTop(bool top)
{
bool needShow = false;

View file

@ -14,6 +14,7 @@ class ToolForm;
class Device;
class FileHandler;
class QYUVOpenGLWidget;
class QLabel;
class VideoForm : public QWidget
{
Q_OBJECT
@ -29,9 +30,11 @@ public:
const QSize &frameSize();
void resizeSquare();
void removeBlackRect();
void showFPS(bool show);
public slots:
void onSwitchFullScreen();
void updateFPS(quint32 fps);
private:
void updateStyleSheet(bool vertical);
@ -68,6 +71,7 @@ private:
QPointer<ToolForm> m_toolForm;
QPointer<QWidget> m_loadingWidget;
QPointer<QYUVOpenGLWidget> m_videoWidget;
QPointer<QLabel> m_fpsLabel;
//inside member
QSize m_frameSize;

View file

@ -76,6 +76,21 @@ bool DeviceManage::staysOnTop(const QString &serial)
return true;
}
void DeviceManage::showFPS(const QString &serial, bool show)
{
if (!serial.isEmpty() && m_devices.contains(serial)) {
auto it = m_devices.find(serial);
if (!it->data()) {
return;
}
if (!it->data()->getVideoForm()) {
return;
}
it->data()->getVideoForm()->showFPS(show);
}
return;
}
bool DeviceManage::disconnectDevice(const QString &serial)
{
bool ret = false;

View file

@ -16,6 +16,7 @@ public:
bool connectDevice(Device::DeviceParams params);
void updateScript(QString script);
bool staysOnTop(const QString &serial);
void showFPS(const QString &serial, bool show);
bool disconnectDevice(const QString &serial);
void disconnectAllDevice();

View file

@ -188,6 +188,7 @@ void Dialog::on_startServerBtn_clicked()
if (ui->alwaysTopCheck->isChecked()) {
m_deviceManage.staysOnTop(params.serial);
}
m_deviceManage.showFPS(params.serial, ui->fpsCheck->isChecked());
}
void Dialog::on_stopServerBtn_clicked()

View file

@ -208,10 +208,23 @@
<property name="bottomMargin">
<number>0</number>
</property>
<item row="0" column="0">
<widget class="QCheckBox" name="recordScreenCheck">
<item row="1" column="1">
<widget class="QCheckBox" name="closeScreenCheck">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>record screen</string>
<string>screen-off</string>
</property>
</widget>
</item>
<item row="1" column="3">
<widget class="QCheckBox" name="framelessCheck">
<property name="text">
<string>frameless</string>
</property>
</widget>
</item>
@ -231,8 +244,8 @@
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QCheckBox" name="closeScreenCheck">
<item row="0" column="1">
<widget class="QCheckBox" name="notDisplayCheck">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
@ -240,7 +253,10 @@
</sizepolicy>
</property>
<property name="text">
<string>screen-off</string>
<string>background record</string>
</property>
<property name="checkable">
<bool>false</bool>
</property>
</widget>
</item>
@ -260,26 +276,17 @@
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QCheckBox" name="notDisplayCheck">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<item row="0" column="0">
<widget class="QCheckBox" name="recordScreenCheck">
<property name="text">
<string>background record</string>
</property>
<property name="checkable">
<bool>false</bool>
<string>record screen</string>
</property>
</widget>
</item>
<item row="1" column="3">
<widget class="QCheckBox" name="framelessCheck">
<item row="0" column="4">
<widget class="QCheckBox" name="fpsCheck">
<property name="text">
<string>frameless</string>
<string>show fps</string>
</property>
</widget>
</item>

Binary file not shown.

View file

@ -16,22 +16,22 @@
<translation type="vanished">file transfer failed</translation>
</message>
<message>
<location filename="../../device/device.cpp" line="183"/>
<location filename="../../device/device.cpp" line="181"/>
<source>install apk</source>
<translation>install apk</translation>
</message>
<message>
<location filename="../../device/device.cpp" line="185"/>
<location filename="../../device/device.cpp" line="183"/>
<source>file transfer</source>
<translation>file transfer</translation>
</message>
<message>
<location filename="../../device/device.cpp" line="189"/>
<location filename="../../device/device.cpp" line="187"/>
<source>wait current %1 to complete</source>
<translation>wait current %1 to complete</translation>
</message>
<message>
<location filename="../../device/device.cpp" line="192"/>
<location filename="../../device/device.cpp" line="190"/>
<source>%1 complete, save in %2</source>
<translation>%1 complete, save in %2</translation>
</message>
@ -41,7 +41,7 @@
<translation type="vanished">%1 complete\n save in %2</translation>
</message>
<message>
<location filename="../../device/device.cpp" line="195"/>
<location filename="../../device/device.cpp" line="193"/>
<source>%1 failed</source>
<translation>%1 failed</translation>
</message>
@ -49,17 +49,17 @@
<context>
<name>Dialog</name>
<message>
<location filename="../../dialog.ui" line="422"/>
<location filename="../../dialog.ui" line="429"/>
<source>Wireless</source>
<translation>Wireless</translation>
</message>
<message>
<location filename="../../dialog.ui" line="506"/>
<location filename="../../dialog.ui" line="513"/>
<source>wireless connect</source>
<translation>wireless connect</translation>
</message>
<message>
<location filename="../../dialog.ui" line="522"/>
<location filename="../../dialog.ui" line="529"/>
<source>wireless disconnect</source>
<translation>wireless disconnect</translation>
</message>
@ -75,7 +75,7 @@
</message>
<message>
<location filename="../../dialog.ui" line="144"/>
<location filename="../../dialog.cpp" line="328"/>
<location filename="../../dialog.cpp" line="325"/>
<source>select path</source>
<translation>select path</translation>
</message>
@ -85,42 +85,47 @@
<translation>record format:</translation>
</message>
<message>
<location filename="../../dialog.ui" line="214"/>
<location filename="../../dialog.ui" line="282"/>
<source>record screen</source>
<translation>record screen</translation>
</message>
<message>
<location filename="../../dialog.ui" line="282"/>
<location filename="../../dialog.ui" line="227"/>
<source>frameless</source>
<translation>frameless</translation>
</message>
<message>
<location filename="../../dialog.ui" line="379"/>
<location filename="../../dialog.ui" line="289"/>
<source>show fps</source>
<translation>show fps</translation>
</message>
<message>
<location filename="../../dialog.ui" line="386"/>
<source>stop all server</source>
<translation>stop all server</translation>
</message>
<message>
<location filename="../../dialog.ui" line="556"/>
<location filename="../../dialog.ui" line="563"/>
<source>adb command:</source>
<translation>adb command:</translation>
</message>
<message>
<location filename="../../dialog.ui" line="592"/>
<location filename="../../dialog.ui" line="599"/>
<source>terminate</source>
<translation>terminate</translation>
</message>
<message>
<location filename="../../dialog.ui" line="579"/>
<location filename="../../dialog.ui" line="586"/>
<source>execute</source>
<translation>execute</translation>
</message>
<message>
<location filename="../../dialog.ui" line="605"/>
<location filename="../../dialog.ui" line="612"/>
<source>clear</source>
<translation>clear</translation>
</message>
<message>
<location filename="../../dialog.ui" line="256"/>
<location filename="../../dialog.ui" line="272"/>
<source>reverse connection</source>
<translation>reverse connection</translation>
</message>
@ -129,12 +134,12 @@
<translation type="vanished">auto enable</translation>
</message>
<message>
<location filename="../../dialog.ui" line="272"/>
<location filename="../../dialog.ui" line="256"/>
<source>background record</source>
<translation>background record</translation>
</message>
<message>
<location filename="../../dialog.ui" line="243"/>
<location filename="../../dialog.ui" line="220"/>
<source>screen-off</source>
<translation>screen-off</translation>
</message>
@ -149,7 +154,7 @@
<translation>max size:</translation>
</message>
<message>
<location filename="../../dialog.ui" line="227"/>
<location filename="../../dialog.ui" line="240"/>
<source>always on top</source>
<translation>always on top</translation>
</message>
@ -159,27 +164,27 @@
<translation>refresh script</translation>
</message>
<message>
<location filename="../../dialog.ui" line="396"/>
<location filename="../../dialog.ui" line="403"/>
<source>get device IP</source>
<translation>get device IP</translation>
</message>
<message>
<location filename="../../dialog.ui" line="295"/>
<location filename="../../dialog.ui" line="302"/>
<source>USB line</source>
<translation>USB line</translation>
</message>
<message>
<location filename="../../dialog.ui" line="351"/>
<location filename="../../dialog.ui" line="358"/>
<source>stop server</source>
<translation>stop server</translation>
</message>
<message>
<location filename="../../dialog.ui" line="341"/>
<location filename="../../dialog.ui" line="348"/>
<source>start server</source>
<translation>start server</translation>
</message>
<message>
<location filename="../../dialog.ui" line="331"/>
<location filename="../../dialog.ui" line="338"/>
<source>device serial:</source>
<translation>device serial:</translation>
</message>
@ -193,17 +198,17 @@
<translation>bit rate:</translation>
</message>
<message>
<location filename="../../dialog.ui" line="406"/>
<location filename="../../dialog.ui" line="413"/>
<source>start adbd</source>
<translation>start adbd</translation>
</message>
<message>
<location filename="../../dialog.ui" line="386"/>
<location filename="../../dialog.ui" line="393"/>
<source>refresh devices</source>
<translation>refresh devices</translation>
</message>
<message>
<location filename="../../dialog.cpp" line="103"/>
<location filename="../../dialog.cpp" line="101"/>
<source>original</source>
<translation>original</translation>
</message>
@ -221,7 +226,7 @@ You can download it at the following address:</source>
<translation type="vanished">This software is completely open source and free.\nStrictly used for illegal purposes, or at your own risk.\nYou can download it at the following address:</translation>
</message>
<message>
<location filename="../../main.cpp" line="101"/>
<location filename="../../main.cpp" line="103"/>
<source>This software is completely open source and free. Strictly used for illegal purposes, or at your own risk. You can download it at the following address:</source>
<translation>This software is completely open source and free. Strictly used for illegal purposes, or at your own risk. You can download it at the following address:</translation>
</message>
@ -317,7 +322,7 @@ You can download it at the following address:</source>
<translation type="vanished">file transfer failed</translation>
</message>
<message>
<location filename="../../device/ui/videoform.cpp" line="657"/>
<location filename="../../device/ui/videoform.cpp" line="671"/>
<source>file does not exist</source>
<translation>file does not exist</translation>
</message>

Binary file not shown.

View file

@ -16,22 +16,22 @@
<translation type="vanished"></translation>
</message>
<message>
<location filename="../../device/device.cpp" line="183"/>
<location filename="../../device/device.cpp" line="181"/>
<source>install apk</source>
<translation>apk</translation>
</message>
<message>
<location filename="../../device/device.cpp" line="185"/>
<location filename="../../device/device.cpp" line="183"/>
<source>file transfer</source>
<translation></translation>
</message>
<message>
<location filename="../../device/device.cpp" line="189"/>
<location filename="../../device/device.cpp" line="187"/>
<source>wait current %1 to complete</source>
<translation>%1</translation>
</message>
<message>
<location filename="../../device/device.cpp" line="192"/>
<location filename="../../device/device.cpp" line="190"/>
<source>%1 complete, save in %2</source>
<translation>%1,%2</translation>
</message>
@ -41,7 +41,7 @@
<translation type="vanished">%1\n %2</translation>
</message>
<message>
<location filename="../../device/device.cpp" line="195"/>
<location filename="../../device/device.cpp" line="193"/>
<source>%1 failed</source>
<translation>%1 </translation>
</message>
@ -49,17 +49,17 @@
<context>
<name>Dialog</name>
<message>
<location filename="../../dialog.ui" line="422"/>
<location filename="../../dialog.ui" line="429"/>
<source>Wireless</source>
<translation>线</translation>
</message>
<message>
<location filename="../../dialog.ui" line="506"/>
<location filename="../../dialog.ui" line="513"/>
<source>wireless connect</source>
<translation>线</translation>
</message>
<message>
<location filename="../../dialog.ui" line="522"/>
<location filename="../../dialog.ui" line="529"/>
<source>wireless disconnect</source>
<translation>线</translation>
</message>
@ -75,7 +75,7 @@
</message>
<message>
<location filename="../../dialog.ui" line="144"/>
<location filename="../../dialog.cpp" line="328"/>
<location filename="../../dialog.cpp" line="325"/>
<source>select path</source>
<translation></translation>
</message>
@ -85,42 +85,47 @@
<translation></translation>
</message>
<message>
<location filename="../../dialog.ui" line="214"/>
<location filename="../../dialog.ui" line="282"/>
<source>record screen</source>
<translation></translation>
</message>
<message>
<location filename="../../dialog.ui" line="282"/>
<location filename="../../dialog.ui" line="227"/>
<source>frameless</source>
<translation></translation>
</message>
<message>
<location filename="../../dialog.ui" line="379"/>
<location filename="../../dialog.ui" line="289"/>
<source>show fps</source>
<translation>fps</translation>
</message>
<message>
<location filename="../../dialog.ui" line="386"/>
<source>stop all server</source>
<translation></translation>
</message>
<message>
<location filename="../../dialog.ui" line="556"/>
<location filename="../../dialog.ui" line="563"/>
<source>adb command:</source>
<translation>adb命令</translation>
</message>
<message>
<location filename="../../dialog.ui" line="592"/>
<location filename="../../dialog.ui" line="599"/>
<source>terminate</source>
<translation></translation>
</message>
<message>
<location filename="../../dialog.ui" line="579"/>
<location filename="../../dialog.ui" line="586"/>
<source>execute</source>
<translation></translation>
</message>
<message>
<location filename="../../dialog.ui" line="605"/>
<location filename="../../dialog.ui" line="612"/>
<source>clear</source>
<translation></translation>
</message>
<message>
<location filename="../../dialog.ui" line="256"/>
<location filename="../../dialog.ui" line="272"/>
<source>reverse connection</source>
<translation></translation>
</message>
@ -129,12 +134,12 @@
<translation type="vanished"></translation>
</message>
<message>
<location filename="../../dialog.ui" line="272"/>
<location filename="../../dialog.ui" line="256"/>
<source>background record</source>
<translation></translation>
</message>
<message>
<location filename="../../dialog.ui" line="243"/>
<location filename="../../dialog.ui" line="220"/>
<source>screen-off</source>
<translation></translation>
</message>
@ -149,7 +154,7 @@
<translation></translation>
</message>
<message>
<location filename="../../dialog.ui" line="227"/>
<location filename="../../dialog.ui" line="240"/>
<source>always on top</source>
<translation></translation>
</message>
@ -159,27 +164,27 @@
<translation></translation>
</message>
<message>
<location filename="../../dialog.ui" line="396"/>
<location filename="../../dialog.ui" line="403"/>
<source>get device IP</source>
<translation>IP</translation>
</message>
<message>
<location filename="../../dialog.ui" line="295"/>
<location filename="../../dialog.ui" line="302"/>
<source>USB line</source>
<translation>USB线</translation>
</message>
<message>
<location filename="../../dialog.ui" line="351"/>
<location filename="../../dialog.ui" line="358"/>
<source>stop server</source>
<translation></translation>
</message>
<message>
<location filename="../../dialog.ui" line="341"/>
<location filename="../../dialog.ui" line="348"/>
<source>start server</source>
<translation></translation>
</message>
<message>
<location filename="../../dialog.ui" line="331"/>
<location filename="../../dialog.ui" line="338"/>
<source>device serial:</source>
<translation></translation>
</message>
@ -193,17 +198,17 @@
<translation></translation>
</message>
<message>
<location filename="../../dialog.ui" line="406"/>
<location filename="../../dialog.ui" line="413"/>
<source>start adbd</source>
<translation>adbd</translation>
</message>
<message>
<location filename="../../dialog.ui" line="386"/>
<location filename="../../dialog.ui" line="393"/>
<source>refresh devices</source>
<translation></translation>
</message>
<message>
<location filename="../../dialog.cpp" line="103"/>
<location filename="../../dialog.cpp" line="101"/>
<source>original</source>
<translation></translation>
</message>
@ -221,7 +226,7 @@ You can download it at the following address:</source>
<translation type="vanished">.\n严禁用于非法用途.\n你可以在下面地址下载:</translation>
</message>
<message>
<location filename="../../main.cpp" line="101"/>
<location filename="../../main.cpp" line="103"/>
<source>This software is completely open source and free. Strictly used for illegal purposes, or at your own risk. You can download it at the following address:</source>
<translation>:</translation>
</message>
@ -317,7 +322,7 @@ You can download it at the following address:</source>
<translation type="vanished"></translation>
</message>
<message>
<location filename="../../device/ui/videoform.cpp" line="657"/>
<location filename="../../device/ui/videoform.cpp" line="671"/>
<source>file does not exist</source>
<translation></translation>
</message>

View file

@ -1,5 +1,6 @@
# QtScrcpy
[![Financial Contributors on Open Collective](https://opencollective.com/QtScrcpy/all/badge.svg?label=financial+contributors)](https://opencollective.com/QtScrcpy)
![Windows](https://github.com/barry-ran/QtScrcpy/workflows/Windows/badge.svg)
![MacOS](https://github.com/barry-ran/QtScrcpy/workflows/MacOS/badge.svg)
![Ubuntu](https://github.com/barry-ran/QtScrcpy/workflows/Ubuntu/badge.svg)
@ -51,6 +52,11 @@ Here is the instruction of adding new customized mapping files.
- Press the ~ key again to switch back to normal mode
- (For PUBG and similar games) If you want to drive cars with WASD, you need to check the `single rocker mode` in the game setting.
## Group control
You can control all your phones at the same time.
![](docs/image/group-control.gif)
## Thanks
QtScrcpy is based on [Genymobile's](https://github.com/Genymobile) [scrcpy](https://github.com/Genymobile/scrcpy) project. Thanks
@ -65,7 +71,7 @@ video render|sdl|opengl
cross-platform|self implemented|provided by Qt
language|C|C++
style|sync|async
control|single touch|single/multi touch
keymap|no custom keymap|support custom keymap
build|meson+gradle|Qt Creator
- It's very easy to customize your GUI with Qt
@ -264,3 +270,33 @@ Since it is based on scrcpy, respect its Licence
[Barry CSDN](https://blog.csdn.net/rankun1)
An ordinary programmer, working mainly in C++ for desktop client development, graduated from Shandong for more than a year of steel simulation education software, and later moved to Shanghai to work in security, online education related fields, familiar with audio and video. I have an understanding of audio and video fields such as voice calls, live education, video conferencing and other related solutions. At the same time have android, linux server and other development experience.
## Contributors
### Code Contributors
This project exists thanks to all the people who contribute. [[Contribute](CONTRIBUTING.md)].
<a href="https://github.com/barry-ran/QtScrcpy/graphs/contributors"><img src="https://opencollective.com/QtScrcpy/contributors.svg?width=890&button=false" /></a>
### Financial Contributors
Become a financial contributor and help us sustain our community. [[Contribute](https://opencollective.com/QtScrcpy/contribute)]
#### Individuals
<a href="https://opencollective.com/QtScrcpy"><img src="https://opencollective.com/QtScrcpy/individuals.svg?width=890"></a>
#### Organizations
Support this project with your organization. Your logo will show up here with a link to your website. [[Contribute](https://opencollective.com/QtScrcpy/contribute)]
<a href="https://opencollective.com/QtScrcpy/organization/0/website"><img src="https://opencollective.com/QtScrcpy/organization/0/avatar.svg"></a>
<a href="https://opencollective.com/QtScrcpy/organization/1/website"><img src="https://opencollective.com/QtScrcpy/organization/1/avatar.svg"></a>
<a href="https://opencollective.com/QtScrcpy/organization/2/website"><img src="https://opencollective.com/QtScrcpy/organization/2/avatar.svg"></a>
<a href="https://opencollective.com/QtScrcpy/organization/3/website"><img src="https://opencollective.com/QtScrcpy/organization/3/avatar.svg"></a>
<a href="https://opencollective.com/QtScrcpy/organization/4/website"><img src="https://opencollective.com/QtScrcpy/organization/4/avatar.svg"></a>
<a href="https://opencollective.com/QtScrcpy/organization/5/website"><img src="https://opencollective.com/QtScrcpy/organization/5/avatar.svg"></a>
<a href="https://opencollective.com/QtScrcpy/organization/6/website"><img src="https://opencollective.com/QtScrcpy/organization/6/avatar.svg"></a>
<a href="https://opencollective.com/QtScrcpy/organization/7/website"><img src="https://opencollective.com/QtScrcpy/organization/7/avatar.svg"></a>
<a href="https://opencollective.com/QtScrcpy/organization/8/website"><img src="https://opencollective.com/QtScrcpy/organization/8/avatar.svg"></a>
<a href="https://opencollective.com/QtScrcpy/organization/9/website"><img src="https://opencollective.com/QtScrcpy/organization/9/avatar.svg"></a>

View file

@ -51,6 +51,11 @@ QtScrcpy可以通过USB(或通过TCP/IP)连接Android设备并进行显示和
- 再次按~键切换为正常控制模式
- 要想wasd控制开车记得在载具设置中设置为单摇杆模式
## 群控
你可以同时控制所有的手机
![gc](docs/image/group-control.gif)
## 感谢
基于[Genymobile](https://github.com/Genymobile)的[scrcpy](https://github.com/Genymobile/scrcpy)项目进行复刻重构非常感谢。QtScrcpy和原版scrcpy区别如下
@ -63,7 +68,7 @@ QtScrcpy可以通过USB(或通过TCP/IP)连接Android设备并进行显示和
跨平台基础设施|自己封装|Qt提供
编程语言|C|C++
编程方式|同步|异步
控制方式|单点触控|单点/多点触控
按键映射|不支持自定义|支持自定义按键映射
编译方式|meson+gradle|Qt Creator
- 使用Qt可以非常容易的定制自己的界面

View file

@ -26,6 +26,11 @@ QtScrcpy.exe>属性>兼容性>更改高DPI设置>覆盖高DPI缩放行为>由以
![image](image/USB调试(安全设置).jpg)
## 可以控制,但无法看到画面
控制台错误信息可能会包含 QOpenGLShaderProgram::attributeLocation(vertexIn): shader program is not linked
一般是由于显卡不支持当前的视频渲染方式config.ini里修改下解码方式改成1或者2试试
## 手机通过数据线连接电脑,刷新设备列表以后,没有任何设备出现
随便下载一个手机助手尝试连接成功以后再用QtScrcpy刷新设备列表连接
@ -35,6 +40,3 @@ QtScrcpy.exe>属性>兼容性>更改高DPI设置>覆盖高DPI缩放行为>由以
## 错误信息Could not open video stream
导致这个错误的原因有很多,最简单的解决方法是在分辨率设置中,选择一个较低的分辨率
## 错误信息QOpenGLShaderProgram::attributeLocation(vertexIn): shader program is not linked
config.ini里修改下解码方式改成1或者2试试

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 MiB