Skip to content

Commit bbe5aa8

Browse files
Add NXP-specific low latency parser toggle
1 parent 39f46df commit bbe5aa8

File tree

4 files changed

+30
-0
lines changed

4 files changed

+30
-0
lines changed

app/util/qopenhd.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -393,6 +393,15 @@ bool QOpenHD::is_platform_rock()
393393
#endif
394394
}
395395

396+
bool QOpenHD::is_platform_nxp()
397+
{
398+
#ifdef IS_PLATFORM_NXP
399+
return true;
400+
#else
401+
return false;
402+
#endif
403+
}
404+
396405
void QOpenHD::keep_screen_on(bool on)
397406
{
398407
#if defined(__android__)

app/util/qopenhd.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ class QOpenHD : public QObject
6969
Q_INVOKABLE bool ping_ip(QString ip);
7070
Q_INVOKABLE bool is_platform_rpi();
7171
Q_INVOKABLE bool is_platform_rock();
72+
Q_INVOKABLE bool is_platform_nxp();
7273
//
7374
// Tries to mimic android toast as much as possible
7475
//

app/videostreaming/avcodec/avcodec_video.pri

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,5 +53,12 @@ exists(/usr/local/share/openhd/platform/rock/) {
5353
message(This is not a Rock)
5454
}
5555

56+
exists(/usr/local/share/openhd/platform/nxp/) {
57+
message(This is an NXP device)
58+
DEFINES += IS_PLATFORM_NXP
59+
} else {
60+
message(This is not an NXP device)
61+
}
62+
5663
# can be used in c++, also set to be exposed in qml
5764
DEFINES += QOPENHD_ENABLE_VIDEO_VIA_AVCODEC

qml/ui/configpopup/qopenhd_settings/AppVideoSettingsView.qml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,19 @@ ScrollView {
115115
}
116116
}
117117
}
118+
SettingBaseElement{
119+
m_short_description: "Use low latency RTP parser"
120+
visible: _qopenhd.is_platform_nxp()
121+
Switch {
122+
width: 32
123+
height: elementHeight
124+
anchors.rightMargin: Qt.inputMethod.visible ? 96 : 36
125+
anchors.right: parent.right
126+
anchors.verticalCenter: parent.verticalCenter
127+
checked: settings.dev_use_low_latency_parser_when_possible
128+
onCheckedChanged: settings.dev_use_low_latency_parser_when_possible = checked
129+
}
130+
}
118131
SettingBaseElement{
119132
m_short_description: "Use Software Decode"
120133
Switch {

0 commit comments

Comments
 (0)