-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmain.cpp
More file actions
executable file
·52 lines (39 loc) · 1.74 KB
/
main.cpp
File metadata and controls
executable file
·52 lines (39 loc) · 1.74 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
48
49
50
51
52
#include "mainwindow.h"
#include <QApplication>
#include "network/udpconnection.h"
#include "network/networkhandler.h"
#include "network/tcpconnection.h"
#include "joystick/sdljoystick.h"
#include "joystick/joystickhandler.h"
#include <QGst/Init>
#include <QThreadPool>
int main(int argc, char *argv[])
{
QGst::init(&argc, &argv);
QApplication a(argc, argv);
// Camera player1(0, "v4l2src device=/dev/video0 ! video/x-raw, framerate=30/1,widtb=1280,heigt=720 ! vaapipostproc");
// Camera player1(0, "v4l2src device=/dev/video1 ! image/jpeg, width=1280, height=720, framerate=60/1 ! rtpjpegpay ! application/x-rtp,media=(string)video,clock-rate=90000,encoding-name=JPEG ! rtpjpegdepay ! jpegdec ! vaapipostproc");
Camera player1(0, "udpsrc port=1234 ! application/x-rtp,media=video,clock-rate=90000,encoding-name=JPEG ! rtpjpegdepay ! jpegdec ! vaapipostproc");
Camera player2(0, "udpsrc port=8765 ! application/x-rtp,media=video,clock-rate=90000,encoding-name=JPEG ! rtpjpegdepay ! jpegdec ! vaapipostproc");
player1.init();
player2.init();
player1.play();
player2.play();
Camera player3(0, "udpsrc port=0000 ! application/x-rtp,media=video,clock-rate=90000,encoding-name=JPEG ! rtpjpegdepay ! jpegdec ! vaapipostproc");
Camera player4(0, "udpsrc port=0000 ! application/x-rtp, payload=127 ! rtph264depay ! avdec_h264 ! videoconvert ! vaapipostproc");
player3.init();
player4.init();
player3.play();
player4.play();
MainWindow w0(0, &player1, &player2, true);
// MainWindow w1(0, &player3, &player4, false);
NetworkHandler nh;
JoystickHandler s(0, &nh, &w0);
// HandlersThread ht;
// ht.start();
// ht.wait();
// w.changeTab(2);
w0.show();
// w1.show();
return a.exec();
}