MythTV
master
mythplugins
mythzoneminder
mythzoneminder
zmliveplayer.h
Go to the documentation of this file.
1
/* ============================================================
2
* This program is free software; you can redistribute it
3
* and/or modify it under the terms of the GNU General
4
* Public License as published bythe Free Software Foundation;
5
* either version 2, or (at your option)
6
* any later version.
7
*
8
* This program is distributed in the hope that it will be useful,
9
* but WITHOUT ANY WARRANTY; without even the implied warranty of
10
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
* GNU General Public License for more details.
12
*
13
* ============================================================ */
14
15
#ifndef ZMLIVEPLAYER_H
16
#define ZMLIVEPLAYER_H
17
18
// c++
19
#include <vector>
20
21
// qt
22
//#include <QKeyEvent>
23
#include <QObject>
24
25
// mythtv
26
#include <
libmythui/mythdialogbox.h
>
27
#include <
libmythui/mythscreentype.h
>
28
#include <
libmythui/mythuiimage.h
>
29
#include <
libmythui/mythuitext.h
>
30
31
// mythzoneminder
32
#include "
zmdefines.h
"
33
34
class
Player
35
{
36
public
:
37
Player
(
void
) =
default
;
38
~Player
(
void
) =
default
;
39
40
void
updateFrame
(
const
uchar* buffer);
41
void
updateStatus
(
void
);
42
void
updateCamera
();
43
44
void
setMonitor
(
const
Monitor
*mon);
45
void
setWidgets
(
MythUIImage
*image,
MythUIText
*status,
46
MythUIText
*camera);
47
48
Monitor
*
getMonitor
(
void
) {
return
&
m_monitor
; }
49
50
private
:
51
MythUIImage
*
m_frameImage
{
nullptr
};
52
MythUIText
*
m_statusText
{
nullptr
};
53
MythUIText
*
m_cameraText
{
nullptr
};
54
55
Monitor
m_monitor
;
56
};
57
58
class
ZMLivePlayer
:
public
MythScreenType
59
{
60
Q_OBJECT
61
62
public
:
63
explicit
ZMLivePlayer
(
MythScreenStack
*parent,
bool
isMiniPlayer =
false
);
64
~ZMLivePlayer
()
override
;
65
66
bool
Create
(
void
)
override
;
// MythScreenType
67
bool
keyPressEvent
(QKeyEvent *event)
override
;
// MythScreenType
68
void
customEvent
(QEvent *event)
override
;
// MythUIType
69
70
void
ShowMenu
()
override
;
// MythScreenType
71
72
void
setMonitorLayout
(
int
layout,
bool
restore =
false
);
73
74
protected
slots:
75
void
updateFrame
(
void
);
76
bool
initMonitorLayout
(
int
layout);
77
78
protected
:
79
MythUIType
*
GetMythUIType
(
const
QString &name,
bool
optional =
false
);
80
bool
hideAll
();
81
void
stopPlayers
(
void
);
82
void
changePlayerMonitor
(
int
playerNo);
83
void
changeView
(
void
);
84
85
QTimer *
m_frameTimer
{
nullptr
};
86
bool
m_paused
{
false
};
87
int
m_monitorLayout
{1};
88
int
m_monitorCount
{0};
89
90
std::vector<Player *> *
m_players
{
nullptr
};
91
92
bool
m_isMiniPlayer
{
false
};
93
int
m_alarmMonitor
{-1};
94
};
95
96
#endif
Monitor
Definition:
zmdefines.h:109
MythScreenStack
Definition:
mythscreenstack.h:17
MythScreenType
Screen in which all other widgets are contained and rendered.
Definition:
mythscreentype.h:46
MythUIImage
Image widget, displays a single image or multiple images in sequence.
Definition:
mythuiimage.h:98
MythUIText
All purpose text widget, displays a text string.
Definition:
mythuitext.h:29
MythUIType
The base class on which all widgets and screens are based.
Definition:
mythuitype.h:86
Player
Definition:
zmliveplayer.h:35
Player::getMonitor
Monitor * getMonitor(void)
Definition:
zmliveplayer.h:48
Player::m_frameImage
MythUIImage * m_frameImage
Definition:
zmliveplayer.h:51
Player::m_statusText
MythUIText * m_statusText
Definition:
zmliveplayer.h:52
Player::updateFrame
void updateFrame(const uchar *buffer)
Definition:
zmliveplayer.cpp:489
Player::updateStatus
void updateStatus(void)
Definition:
zmliveplayer.cpp:499
Player::setWidgets
void setWidgets(MythUIImage *image, MythUIText *status, MythUIText *camera)
Definition:
zmliveplayer.cpp:473
Player::m_cameraText
MythUIText * m_cameraText
Definition:
zmliveplayer.h:53
Player::setMonitor
void setMonitor(const Monitor *mon)
Definition:
zmliveplayer.cpp:468
Player::updateCamera
void updateCamera()
Definition:
zmliveplayer.cpp:514
Player::Player
Player(void)=default
Player::m_monitor
Monitor m_monitor
Definition:
zmliveplayer.h:55
Player::~Player
~Player(void)=default
ZMLivePlayer
Definition:
zmliveplayer.h:59
ZMLivePlayer::m_paused
bool m_paused
Definition:
zmliveplayer.h:86
ZMLivePlayer::m_isMiniPlayer
bool m_isMiniPlayer
Definition:
zmliveplayer.h:92
ZMLivePlayer::m_frameTimer
QTimer * m_frameTimer
Definition:
zmliveplayer.h:85
ZMLivePlayer::GetMythUIType
MythUIType * GetMythUIType(const QString &name, bool optional=false)
Definition:
zmliveplayer.cpp:77
ZMLivePlayer::m_monitorCount
int m_monitorCount
Definition:
zmliveplayer.h:88
ZMLivePlayer::~ZMLivePlayer
~ZMLivePlayer() override
Definition:
zmliveplayer.cpp:159
ZMLivePlayer::initMonitorLayout
bool initMonitorLayout(int layout)
Definition:
zmliveplayer.cpp:142
ZMLivePlayer::ZMLivePlayer
ZMLivePlayer(MythScreenStack *parent, bool isMiniPlayer=false)
Definition:
zmliveplayer.cpp:34
ZMLivePlayer::keyPressEvent
bool keyPressEvent(QKeyEvent *event) override
Key event handler.
Definition:
zmliveplayer.cpp:190
ZMLivePlayer::stopPlayers
void stopPlayers(void)
Definition:
zmliveplayer.cpp:389
ZMLivePlayer::hideAll
bool hideAll()
Definition:
zmliveplayer.cpp:87
ZMLivePlayer::m_monitorLayout
int m_monitorLayout
Definition:
zmliveplayer.h:87
ZMLivePlayer::Create
bool Create(void) override
Definition:
zmliveplayer.cpp:48
ZMLivePlayer::m_players
std::vector< Player * > * m_players
Definition:
zmliveplayer.h:90
ZMLivePlayer::changeView
void changeView(void)
Definition:
zmliveplayer.cpp:306
ZMLivePlayer::setMonitorLayout
void setMonitorLayout(int layout, bool restore=false)
Definition:
zmliveplayer.cpp:394
ZMLivePlayer::m_alarmMonitor
int m_alarmMonitor
Definition:
zmliveplayer.h:93
ZMLivePlayer::changePlayerMonitor
void changePlayerMonitor(int playerNo)
Definition:
zmliveplayer.cpp:314
ZMLivePlayer::ShowMenu
void ShowMenu() override
Definition:
zmliveplayer.cpp:242
ZMLivePlayer::customEvent
void customEvent(QEvent *event) override
Definition:
zmliveplayer.cpp:278
ZMLivePlayer::updateFrame
void updateFrame(void)
Definition:
zmliveplayer.cpp:350
mythdialogbox.h
mythscreentype.h
mythuiimage.h
mythuitext.h
zmdefines.h
Generated on Fri Apr 10 2026 03:16:35 for MythTV by
1.9.4