MythTV master
tvplaybackstate.h
Go to the documentation of this file.
1#ifndef TVPLAYBACKSTATE_H
2#define TVPLAYBACKSTATE_H
3
4// Qt
5#include <QRect>
6#include <QObject>
7
8// MythTV
9#include "osd.h"
10#include "mythplayerstate.h"
11
12class MTV_PUBLIC TVPlaybackState : public QObject
13{
14 Q_OBJECT
15
16 public:
17 TVPlaybackState() = default;
18
19 signals:
20 // General
22 void UpdateBookmark(bool Clear = false);
23 void UpdateLastPlayPosition(uint64_t frame);
24
25 // Overlays
26 void IsOSDVisible(bool& Visible);
27 void ChangeOSDPositionUpdates(bool Enable);
29 void ChangeOSDText(const QString &Window, const InfoMap &Map, OSDTimeout Timeout);
31 void ChangeOSDMessage(const QString& Message);
32 void DialogQuit();
33 void HideAll(bool KeepSubs = true, MythScreenType* Except = nullptr, bool DropNotification = false);
34
35 // Audio
37 void ResetAudio();
39 void ChangeMuteState(bool CycleChannels = false);
40 void ChangeVolume(bool Direction, int Volume);
41 void ChangeUpmix(bool Enable, bool Toggle = false);
42 void ChangeAudioOffset(std::chrono::milliseconds Delta, std::chrono::milliseconds Value = -9999ms);
43
44 // Audio and captions
45 void SetTrack(uint Type, uint TrackNo);
46 void ChangeTrack(uint Type, int Direction);
47
48 // Captions/Interactive
52 void SetCaptionsEnabled(bool Enable, bool UpdateOSD = true);
53 void DisableCaptions(uint Mode, bool UpdateOSD = true);
54 void EnableCaptions(uint Mode, bool UpdateOSD = true);
55 void ChangeCaptionTrack(int Direction);
56
58 void EnableTeletext(int Page = 0x100);
61 void HandleTeletextAction(const QString &Action, bool& Handled);
62 void RestartITV(uint Chanid, uint Cardid, bool IsLiveTV);
63 void HandleITVAction(const QString& Action, bool& Handled);
64 void AdjustSubtitleZoom(int Delta);
65 void AdjustSubtitleDelay(std::chrono::milliseconds Delta);
66
67 // Video
68 void RequestEmbedding(bool Embed, const QRect& Rect = {}, const QStringList& Data = {});
69 void EmbedPlayback(bool Embed, const QRect& Rect = {});
70 void ResizeScreenForVideo(QSize Size = {});
71 void WindowResized(const QSize& Size);
73 void ChangePictureAttribute(PictureAttribute Attribute, bool Direction, int Value);
80
81 // Visualiser
82 void EnableVisualiser(bool Enable, bool Toggle = false, const QString& Name = QString());
83
84 // Discs
85 void GoToMenu(const QString& Menu);
86 void GoToDVDProgram(bool Direction);
87
88 // Editor
89 void EnableEdit();
90 void DisableEdit(int HowToSave);
91 void RefreshEditorState(bool CheckSaved = false);
92
93 public slots:
94 void OverlayStateChanged(MythOverlayState OverlayState);
95 void AudioPlayerStateChanged(const MythAudioPlayerState& AudioPlayerState);
96 void AudioStateChanged(const MythAudioState& AudioState);
97 void CaptionsStateChanged(MythCaptionsState CaptionsState);
98 void VideoBoundsStateChanged(const MythVideoBoundsState& VideoBoundsState);
99 void VideoColourStateChanged(const MythVideoColourState& ColourState);
100 void VisualiserStateChanged(const MythVisualiserState& VisualiserState);
101 void EditorStateChanged(const MythEditorState& EditorState);
102
103 protected:
105 MythAudioPlayerState m_audioPlayerState { };
107 MythCaptionsState m_captionsState { };
112};
113
114#endif
#define Clear(a)
An action (for this plugin) consists of a description, and a set of key sequences.
Definition: action.h:41
A simple wrapper around audio state used to signal changes in the current state.
A simpler than simple wrapper around OSD state.
Screen in which all other widgets are contained and rendered.
Tracks current playback state, as signalled by the player, and requests changes to the current state.
void ChangeAspectOverride(AspectOverrideMode AspectMode=kAspect_Toggle)
void GoToDVDProgram(bool Direction)
void ChangeOSDDebug()
MythAudioState m_audioState
TVPlaybackState()=default
void SetCaptionsEnabled(bool Enable, bool UpdateOSD=true)
void ChangeZoom(ZoomDirection Zoom)
void GoToMenu(const QString &Menu)
void DisableEdit(int HowToSave)
void EnableCaptions(uint Mode, bool UpdateOSD=true)
void ChangeCaptionTrack(int Direction)
void UpdateLastPlayPosition(uint64_t frame)
void ChangeMuteState(bool CycleChannels=false)
void HideAll(bool KeepSubs=true, MythScreenType *Except=nullptr, bool DropNotification=false)
void ResizeScreenForVideo(QSize Size={})
void DisableCaptions(uint Mode, bool UpdateOSD=true)
void ResetTeletext()
void EmbedPlayback(bool Embed, const QRect &Rect={})
void UpdateBookmark(bool Clear=false)
void ChangeOSDMessage(const QString &Message)
void ChangeStereoOverride(StereoscopicMode Mode)
void ChangeOSDDialog(const MythOSDDialogData &Data)
void AdjustSubtitleDelay(std::chrono::milliseconds Delta)
void InitialisePlayerState()
void RefreshEditorState(bool CheckSaved=false)
void AdjustSubtitleZoom(int Delta)
void SaveBottomLine()
MythOverlayState m_overlayState
void ChangeAdjustFill(AdjustFillMode FillMode=kAdjustFill_Toggle)
void WindowResized(const QSize &Size)
void ChangeOSDPositionUpdates(bool Enable)
void ToggleDetectLetterBox()
void ChangeTrack(uint Type, int Direction)
void SetTeletextPage(uint Page)
void RequestEmbedding(bool Embed, const QRect &Rect={}, const QStringList &Data={})
MythVisualiserState m_visualiserState
void HandleTeletextAction(const QString &Action, bool &Handled)
void RestartITV(uint Chanid, uint Cardid, bool IsLiveTV)
void ResetCaptions()
void PauseAudioUntilReady()
void ToggleCaptions()
void ToggleMoveBottomLine()
void HandleITVAction(const QString &Action, bool &Handled)
void EnableTeletext(int Page=0x100)
MythVideoColourState m_videoColourState
void ChangeVolume(bool Direction, int Volume)
void ToggleCaptionsByType(uint Type)
MythVideoBoundsState m_videoBoundsState
void IsOSDVisible(bool &Visible)
void ChangeAudioOffset(std::chrono::milliseconds Delta, std::chrono::milliseconds Value=-9999ms)
void ChangeAllowForcedSubtitles(bool Allow)
void ChangePictureAttribute(PictureAttribute Attribute, bool Direction, int Value)
void EnableVisualiser(bool Enable, bool Toggle=false, const QString &Name=QString())
void ChangeUpmix(bool Enable, bool Toggle=false)
MythEditorState m_editorState
void ChangeOSDText(const QString &Window, const InfoMap &Map, OSDTimeout Timeout)
void SetTrack(uint Type, uint TrackNo)
unsigned int uint
Definition: freesurround.h:24
#define MTV_PUBLIC
Definition: mythtvexp.h:15
QHash< QString, QString > InfoMap
Definition: mythtypes.h:15
OSDTimeout
Definition: osd.h:56
Mode
Definition: synaesthesia.h:23
AspectOverrideMode
Definition: videoouttypes.h:61
@ kAspect_Toggle
Definition: videoouttypes.h:62
AdjustFillMode
Definition: videoouttypes.h:72
@ kAdjustFill_Toggle
Definition: videoouttypes.h:73
PictureAttribute
ZoomDirection
Definition: videoouttypes.h:43
StereoscopicMode