forked from linux4sam/atmel-video-player
-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.cpp
40 lines (32 loc) · 872 Bytes
/
main.cpp
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
/*
* Copyright (C) 2013-2015 Atmel Corporation.
*
* This file is licensed under the terms of the Atmel LIMITED License Agreement
* as written in the COPYING file that is delivered in the project root directory.
*
* DISCLAIMER: THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND.
* See the COPYING license file for more details.
*/
#include "player.h"
#include <QApplication>
#include <QThread>
class GMainLoopThread : public QThread
{
void run()
{
GMainLoop *mainloop;
mainloop = g_main_loop_new(NULL, FALSE);
g_main_loop_run(mainloop);
}
};
int main(int argc, char *argv[])
{
GMainLoopThread *mainloop = new GMainLoopThread;
QApplication a(argc, argv);
Player w;
w.show();
// Start listener for GStreamer messages
mainloop->start();
// Run QT event loop
return a.exec();
}