-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdisplayctrlfunctions.cpp
More file actions
47 lines (41 loc) · 1.37 KB
/
displayctrlfunctions.cpp
File metadata and controls
47 lines (41 loc) · 1.37 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#include "displayctrlfunctions.h"
DisplayCtrlFunctions::DisplayCtrlFunctions(QObject *parent)
: QObject(parent)
, m_reverCAMFlag(false)
, m_thirdCAMFlag(false)
, m_secondCAMFlag(false)
{
}
void DisplayCtrlFunctions::displaymainFocusCAM(bool reverCAMFlag)
{
//! Test video source 1
m_reverCAMFlag = reverCAMFlag;
if(m_reverCAMFlag){
QFuture<void> future = QtConcurrent::run([=]() {
QString command= "gst-launch-1.0 videotestsrc ! videoconvert ! queue ! autovideosink";
system(command.toStdString().c_str());
});
}
}
void DisplayCtrlFunctions::displaythirdCAM(bool thirdCAMFlag)
{
//! Test video source 2
m_thirdCAMFlag = thirdCAMFlag;
if(m_thirdCAMFlag){
QFuture<void> future = QtConcurrent::run([=]() {
QString command= "gst-launch-1.0 videotestsrc pattern=colors ! video/x-raw,width=640,height=480 ! autovideosink";
system(command.toStdString().c_str());
});
}
}
void DisplayCtrlFunctions::displaysecondCAM(bool secondCAMFlag)
{
//! Test video source 3
m_secondCAMFlag = secondCAMFlag;
if(m_secondCAMFlag){
QFuture<void> future = QtConcurrent::run([=]() {
QString command= " gst-launch-1.0 videotestsrc pattern=ball ! video/x-raw,width=640,height=480 ! autovideosink";
system(command.toStdString().c_str());
});
}
}