Rabbit Remote Control 0.0.30
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 // CConnecterConnect interface
30 virtual CConnect *InstanceConnect() override;
31 virtual int Initial() override;
32 virtual int Clean() override;
33
34Q_SIGNALS:
35 void sigStart(bool bStart);
36 void sigPause(bool bPause);
37 void sigChangePosition(qint64 pos);
38
39Q_SIGNALS:
40 void sigScreenShot();
41public Q_SLOTS:
42 virtual void slotScreenShot() override;
43
44private:
45 virtual QDialog *OnOpenDialogSettings(QWidget *parent) override;
46
47private:
48 CParameterPlayer m_Parameters;
49
50#if HAVE_QVideoWidget
51 CFrmPlayer m_Player;
52public:
53 virtual QWidget *GetViewer() override;
54 QVideoSink *GetVideoSink();
55public Q_SLOTS:
56 void slotPositionChanged(qint64 pos, qint64 duration);
57 void slotPlaybackStateChanged(QMediaPlayer::PlaybackState state);
58#if HAVE_QT6_RECORD
59 void slotRecordStateChanged(QMediaRecorder::RecorderState state);
60#endif
61#else
62 QAction* m_pPause;
63#endif
64
65};
66
67#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.