21#include <vdr/thread.h>
120 LOGERROR(
"device: audio init failed, change to detached mode");
277 : cThread(
"event handler"),
307 LOGDEBUG(
"device: event queue handler thread started");
310 std::vector<Event>
local;
322 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 ResumeFromPause(void)
Resume playback from pause state.
bool HaltOpenGlThread(void)
Pause the OpenGL worker thread.
void HandleDisplayModeChange(const sDrmMode &)
Set the display mode.
bool IsDetachForced(void)
Returns true, the a detached plugin start was forced.
void SetTrickSpeed(double, bool, bool)
Set the trickspeed in the renderer.
void HaltVideoThreads(void)
Pause the rendering and decoder thread.
void ResumeVideoThreads(void)
Resume the rendering and decoder thread.
bool SchedulePlaybackStart(void)
Schedules the playback start.
void ResumeOpenGlThread(void)
Resume the OpenGL worker thread.
void EnterState(State)
Actions to be performed when entering a state.
int InitAudio(bool)
Init the audio lazily.
void LeaveState(State)
Actions to be performed when leaving a state.
void HandleStillPicture(const uchar *data, int size)
The still picture data received from VDR can contain multiple PES packets.
void ResetVideoFilter(void)
Reset the video deinterlace filter.
void PausePlayback(bool)
Pause the playback.
void SetDetachForced(void)
void ResumePlayback(void)
Resume playback again.
void ScheduleResyncAtPtsMs(int64_t)
Schedule aa a/v resync in the render thread at the given pts.
State Machine Implementation.
std::atomic< State > m_state
current state
cStateMachine(cSoftHdDevice *)
Create the state machine.
std::mutex m_mutex
state machine mutex
cSoftHdDevice * m_pDevice
pointer to the device
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.
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
Output Device Header File.
Device State Machine and Event Handler Header File.