vdr-plugin-softhddevice-drm-gles
1.6.4-d0291bb
event.h
Go to the documentation of this file.
1
// SPDX-License-Identifier: AGPL-3.0-or-later
2
10
#ifndef __EVENT_H
11
#define __EVENT_H
12
13
#include <variant>
14
#include <vdr/tools.h>
15
16
/********************************************************************************
17
* Event Handler
18
*
19
* Controls the state machine.
20
*******************************************************************************/
21
27
enum
BufferUnderrunType
{
28
VIDEO
,
29
AUDIO
,
30
};
31
32
enum
PipState
{
33
PIPSTART
,
34
PIPSTOP
,
35
PIPTOGGLE
,
36
PIPCHANUP
,
37
PIPCHANDOWN
,
38
PIPCHANSWAP
,
39
PIPSIZECHANGE
,
40
PIPSWAPPOSITION
41
};
42
43
struct
PlayEvent
{};
44
struct
PauseEvent
{};
45
struct
StopEvent
{};
46
struct
TrickSpeedEvent
{
47
double
speed
;
48
bool
active
;
49
bool
forward
;
50
};
51
struct
StillPictureEvent
{
52
const
uchar
*
data
;
53
int
size
;
54
};
55
struct
DetachEvent
{};
56
struct
AttachEvent
{};
57
struct
BufferUnderrunEvent
{
58
BufferUnderrunType
type
;
59
};
60
struct
BufferingThresholdReachedEvent
{};
61
struct
PipEvent
{
62
PipState
state
;
63
};
64
struct
ScheduleResyncAtPtsMsEvent
{
65
int64_t
pts
;
66
};
67
struct
ResyncEvent
{};
68
69
using
Event
= std::variant<
70
PlayEvent
,
71
PauseEvent
,
72
StopEvent
,
73
TrickSpeedEvent
,
74
StillPictureEvent
,
75
DetachEvent
,
76
AttachEvent
,
77
BufferUnderrunEvent
,
78
BufferingThresholdReachedEvent
,
79
PipEvent
,
80
ScheduleResyncAtPtsMsEvent
,
81
ResyncEvent
82
>;
83
91
class
IEventReceiver
{
92
public
:
93
virtual
void
OnEventReceived
(
const
Event
&) = 0;
94
};
95
96
#endif
IEventReceiver
Event Receiver.
Definition
event.h:91
IEventReceiver::OnEventReceived
virtual void OnEventReceived(const Event &)=0
PipState
PipState
Definition
event.h:32
Event
std::variant< PlayEvent, PauseEvent, StopEvent, TrickSpeedEvent, StillPictureEvent, DetachEvent, AttachEvent, BufferUnderrunEvent, BufferingThresholdReachedEvent, PipEvent, ScheduleResyncAtPtsMsEvent, ResyncEvent > Event
Definition
event.h:82
BufferUnderrunType
BufferUnderrunType
Definition
event.h:27
PIPSTOP
@ PIPSTOP
Definition
event.h:34
PIPSWAPPOSITION
@ PIPSWAPPOSITION
Definition
event.h:40
PIPCHANSWAP
@ PIPCHANSWAP
Definition
event.h:38
PIPTOGGLE
@ PIPTOGGLE
Definition
event.h:35
PIPCHANUP
@ PIPCHANUP
Definition
event.h:36
PIPSTART
@ PIPSTART
Definition
event.h:33
PIPSIZECHANGE
@ PIPSIZECHANGE
Definition
event.h:39
PIPCHANDOWN
@ PIPCHANDOWN
Definition
event.h:37
VIDEO
@ VIDEO
Definition
event.h:28
AUDIO
@ AUDIO
Definition
event.h:29
AttachEvent
Definition
event.h:56
BufferUnderrunEvent
Definition
event.h:57
BufferUnderrunEvent::type
BufferUnderrunType type
Definition
event.h:58
BufferingThresholdReachedEvent
Definition
event.h:60
DetachEvent
Definition
event.h:55
PauseEvent
Definition
event.h:44
PipEvent
Definition
event.h:61
PipEvent::state
PipState state
Definition
event.h:62
PlayEvent
Definition
event.h:43
ResyncEvent
Definition
event.h:67
ScheduleResyncAtPtsMsEvent
Definition
event.h:64
ScheduleResyncAtPtsMsEvent::pts
int64_t pts
Definition
event.h:65
StillPictureEvent
Definition
event.h:51
StillPictureEvent::data
const uchar * data
Definition
event.h:52
StillPictureEvent::size
int size
Definition
event.h:53
StopEvent
Definition
event.h:45
TrickSpeedEvent
Definition
event.h:46
TrickSpeedEvent::speed
double speed
Definition
event.h:47
TrickSpeedEvent::active
bool active
Definition
event.h:48
TrickSpeedEvent::forward
bool forward
Definition
event.h:49
vector
Definition
drmhdr.h:33
event.h
Generated by
1.9.8