-
Notifications
You must be signed in to change notification settings - Fork 3
/
player.h
94 lines (75 loc) · 2.01 KB
/
player.h
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
/*
* 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.
*/
#ifndef PLAYER_H
#define PLAYER_H
#include <QMainWindow>
#include <QToolBar>
#include <QTimer>
#include <QFileDialog>
#include <QLabel>
#include <QKeyEvent>
#include "tools.h"
#include "playcontrols.h"
#include "videoplayer.h"
/**
* @file player.h
* @brief Video player main class implementation
*/
/**
* @mainpage Video Player Demo
* @details
* @version 1.0
* @date August 2014
*
*
* \section contents Contents
* - \ref introsec
*
* \section introsec Introduction
*
* Library for the managment of common tasks
*
*/
namespace Ui {
class Player;
}
class Player : public QMainWindow
{
Q_OBJECT
public:
explicit Player(QWidget *parent = 0);
~Player();
private:
Ui::Player *ui;
Tools *_tools;
QToolBar *_toolBar; // To hold the play controls
QLabel *_fpsL; // To display video statistics
PlayControls *_controls; // Play controls
VideoPlayer *_videoplayer; // gstreamer implementation
QTimer *_cpuTimer; // To update CPU usage
QTimer *_hideControlsTimer; // Hide controls after some time with no activity
int _hideTimeout; // Time to hide controls (in seconds)
QFileDialog *_openFileDialog; // select media file
void setUpPlayControls();
void setUpFpsLabel();
void mousePressEvent (QMouseEvent *);
void mouseMoveEvent(QMouseEvent *);
private slots:
void updateCPUusage();
#if defined FPSVIEW
void fpsChanged(QString perf);
#endif
void onControlsTimeout();
void onSetFullScreen();
void onOpenFile();
protected:
void keyPressEvent( QKeyEvent * );
};
#endif // PLAYER_H