21#include <vdr/thread.h>
120 LOGERROR(
"device: audio init failed, change to detached mode");
278 : cThread(
"event handler"),
308 LOGDEBUG(
"device: event queue handler thread started");
311 std::vector<Event>
local;
323 LOGDEBUG(
"device: event queue handler thread stopped");
void AddEvent(Event)
Add an event to the queue.
std::vector< Event > m_eventQueue
event fifo queue
std::mutex m_mutex
queue mutex
~cEventHandler(void)
Stop and delete the event handler thread.
void Action(void)
Periodically send events in the queue to the final event receiver/handler.
cEventHandler(cStateMachine *)
Create and start the event handler thread.
cStateMachine * m_pStateMachine
pointer to state machine
Output Device Implementation.
void HandleStillPicture(const uchar *data, int size)
The still picture data received from VDR can contain multiple PES packets.
void HandleDisplayModeChange(const sDrmMode &)
Set the display mode.
void EnterState(State)
Actions to be performed when entering a state.
void LeaveState(State)
Actions to be performed when leaving a state.
void ResumeVideoThreads(void)
Resume the rendering and decoder thread.
bool HaltOpenGlThread(void)
Pause the OpenGL worker thread.
void ResetVideoFilter(void)
Reset the video deinterlace filter.
void ResumePlayback(void)
Resume playback again.
void SetDetachForced(void)
void HaltVideoThreads(void)
Pause the rendering and decoder thread.
bool IsDetachForced(void)
Returns true, the a detached plugin start was forced.
void SetTrickSpeed(double, bool, bool)
Set the trickspeed in the renderer.
int InitAudio(bool)
Init the audio lazily.
void ResumeOpenGlThread(void)
Resume the OpenGL worker thread.
void PausePlayback(bool)
Pause the playback.
void ScheduleResyncAtPtsMs(int64_t)
Schedule aa a/v resync in the render thread at the given pts.
bool SchedulePlaybackStart(void)
Schedules the playback start.
void ResumeFromPause(void)
Resume playback from pause state.
State Machine Implementation.
cStateMachine(cOutputDevice *)
Create the state machine.
cOutputDevice * m_pDevice
pointer to the device
std::atomic< State > m_state
current state
std::mutex m_mutex
state machine mutex
void ChangeState(State)
Sets the new state and triggers actions, which are necessary when leaving the old and entering the ne...
void OnEventReceived(const Event &)
Event handler for playback state transitions.
Output Device Header File.
std::variant< PlayEvent, PauseEvent, StopEvent, TrickSpeedEvent, StillPictureEvent, DetachEvent, AttachEvent, BufferUnderrunEvent, BufferingThresholdReachedEvent, ScheduleResyncAtPtsMsEvent, ResyncEvent, DisplayChangeEvent > Event
const char * EventToString(const Event &e)
const char * StateToString(State s)
#define LOGDEBUG
log to LOG_DEBUG
#define LOGERROR
log to LOG_ERR
#define LOGWARNING
log to LOG_WARN
Device State Machine and Event Handler Header File.