-
Notifications
You must be signed in to change notification settings - Fork 6
/
cvlcctrl.h
118 lines (103 loc) · 3.04 KB
/
cvlcctrl.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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
/*********************** Information *************************\
| $HeadURL$
|
| Author: Jo2003
|
| Begin: 01.02.2010 / 10:50:35
|
| Last edited by: $Author$
|
| $Id$
\*************************************************************/
#ifndef __020110__CVLCCTRL_H
#define __020110__CVLCCTRL_H
#include <QProcess>
#include <QObject>
#include <QTimer>
#include <QMessageBox>
#include <QTextStream>
#include <QRegExp>
#include <QFile>
#include <QFileInfo>
#include "defdef.h"
#include "templates.h"
#include "ctranslit.h"
#include "playstates.h"
namespace vlcctrl
{
class CVlcCtrl;
enum eVlcAct
{
VLC_PLAY_LIVE,
VLC_PLAY_ARCH,
VLC_REC_LIVE,
VLC_REC_ARCH,
VLC_REC_LIVE_SILENT,
VLC_REC_ARCH_SILENT,
VLC_UNKNOWN = 255
};
}
/********************************************************************\
| Class: CVlcCtrl
| Date: 01.02.2010 / 10:00:28
| Author: Jo2003
| Description: class to control vlc, inherits QProcess
|
\********************************************************************/
class CVlcCtrl : public QProcess
{
Q_OBJECT
public:
CVlcCtrl(const QString &path = QString(), QObject * parent = 0);
virtual ~CVlcCtrl();
void SetProgPath(const QString &str);
Q_PID start (const QString& sCmdLine, int iRunTime = -1, bool bDetach = false,
IncPlay::ePlayStates req = IncPlay::PS_WTF);
void CancelTimer ();
void SetTimer (uint uiTime);
void stop ();
bool IsRunning ();
void SetTranslitPointer (CTranslit *pTr);
void SetTranslitSettings (bool bTr);
QString CreateClArgs (vlcctrl::eVlcAct eAct, const QString &sPlayer,
const QString &url, int iCacheTime, const QString &dst = QString(),
const QString &mux = QString());
int LoadPlayerModule (const QString &sPath);
void UseLibVlc (bool bUsage);
bool withLibVLC();
bool ownDwnld();
bool doTranslit();
private:
QTimer tRunTime;
QString sLivePlay;
QString sArchPlay;
QString sLiveRec;
QString sArchRec;
QString sLiveSilentRec;
QString sArchSilentRec;
QString sAddVlcOpts;
bool bForcedTranslit;
bool bTranslit;
CTranslit *pTranslit;
QString sFrcMx;
bool bUseLibVlc;
IncPlay::ePlayStates libVlcPlayState;
IncPlay::ePlayStates reqState;
bool bOwnDownloader;
private slots:
void slotStateChanged (QProcess::ProcessState newState);
public slots:
virtual void terminate();
void slotLibVlcStateChange (int ps);
signals:
void sigVlcEnds (int iState);
void sigVlcStarts (int iState);
void sigLibVlcPlayMedia (const QString &str, const QString &opts);
void sigLibVlcStop ();
void sigOwnStateChanged (QProcess::ProcessState s);
public slots:
};
#endif /* __020110__CVLCCTRL_H */
/************************* History ***************************\
| $Log$
\*************************************************************/