Rabbit Remote Control 0.0.32
Loading...
Searching...
No Matches
ConnecterPlayer.h
1// Author: Kang Lin <kl222@126.com>
2
3#ifndef CONNETERPLAYER_H
4#define CONNETERPLAYER_H
5
6#pragma once
7
8#include <QMenu>
9#include <QMediaPlayer>
10#include <QMediaRecorder>
11#if HAVE_QVideoWidget
12#include "FrmPlayer.h"
13#endif
14
15#include "ConnecterThread.h"
16#include "ParameterPlayer.h"
17
19{
20 Q_OBJECT
21
22public:
23 explicit CConnecterPlayer(CPluginClient *plugin);
24 virtual ~CConnecterPlayer();
25
26 // CConnecter interface
27public:
28 virtual qint16 Version() override;
29
30protected:
31 // CConnecterConnect interface
32 virtual CConnect *InstanceConnect() override;
33 virtual int Initial() override;
34 virtual int Clean() override;
35 virtual int InitialMenu() override;
36
37Q_SIGNALS:
38 void sigStart(bool bStart);
39 void sigPause(bool bPause);
40 void sigChangePosition(qint64 pos);
41
42Q_SIGNALS:
43 void sigScreenShot();
44public Q_SLOTS:
45 virtual void slotScreenShot() override;
46
47private:
48 virtual QDialog *OnOpenDialogSettings(QWidget *parent) override;
49
50private:
51 CParameterPlayer m_Parameters;
52
53#if HAVE_QVideoWidget
54 CFrmPlayer m_Player;
55public:
56 virtual QWidget *GetViewer() override;
57 QVideoSink *GetVideoSink();
58public Q_SLOTS:
59 void slotPositionChanged(qint64 pos, qint64 duration);
60 void slotPlaybackStateChanged(QMediaPlayer::PlaybackState state);
61 void slotPlaybackError(QMediaPlayer::Error error, const QString &errorString);
62#if HAVE_QT6_RECORD
63 void slotRecordStateChanged(QMediaRecorder::RecorderState state);
64#endif
65#else // #if HAVE_QVideoWidget
66 QAction* m_pPause;
67#endif // #if HAVE_QVideoWidget
68
69};
70
71#endif // CONNETERPLAYER_H
Connect interface.
Definition Connect.h:45
virtual qint16 Version() override
Version.
virtual int Clean() override
Clean parameters and resource.
virtual CConnect * InstanceConnect() override
New connect.
virtual QDialog * OnOpenDialogSettings(QWidget *parent) override
Open settgins dialog.
virtual int Initial() override
Initial parameters and resource.
It starts a background thread by default.
virtual QWidget * GetViewer() override
Get Viewer.
The plugin interface.