MythTV master
mythplayercaptionsui.h
Go to the documentation of this file.
1#ifndef MYTHPLAYERCAPTIONSUI_H
2#define MYTHPLAYERCAPTIONSUI_H
3
4// MythTV
6#include "mythplayeraudioui.h"
7
9{
10 Q_OBJECT
11
12 signals:
14 void ResizeForInteractiveTV(const QRect& Rect);
15 void SetInteractiveStream(const QString& Stream);
16 void SetInteractiveStreamPos(std::chrono::milliseconds Position);
17 void PlayInteractiveStream(bool Play);
18 void EnableSubtitles(bool Enable);
19
20 public:
21 MythPlayerCaptionsUI(MythMainWindow* MainWindow, TV* Tv, PlayerContext* Context, PlayerFlags Flags);
22 ~MythPlayerCaptionsUI() override;
23
24 // N.B. These methods handle audio tracks as well. Fix.
25 QStringList GetTracks(uint Type);
26 uint GetTrackCount(uint Type);
27 int GetTrack(uint Type);
28
29 bool SetAudioByComponentTag(int Tag);
30 bool SetVideoByComponentTag(int Tag);
31 std::chrono::milliseconds GetStreamPos();
32 std::chrono::milliseconds GetStreamMaxPos();
34
35 void tracksChanged(uint TrackType) override;
36
37 protected slots:
38 void InitialiseState() override;
39 void SetAllowForcedSubtitles(bool Allow);
40 void ToggleCaptions();
41 void ToggleCaptionsByType(uint Type);
42 void SetCaptionsEnabled(bool Enable, bool UpdateOSD = true);
43 virtual void DisableCaptions(uint Mode, bool UpdateOSD = true);
44 virtual void EnableCaptions(uint Mode, bool UpdateOSD = true);
45 virtual void SetTrack(uint Type, uint TrackNo);
46 void ChangeCaptionTrack(int Direction);
47 void ChangeTrack(uint Type, int Direction);
48 void ResetCaptions();
49 void EnableTeletext(int Page = 0x100);
50 void ResetTeletext();
51 void SetTeletextPage(uint Page);
52 void HandleTeletextAction(const QString &Action, bool& Handled);
53 void ITVHandleAction(const QString& Action, bool& Handled);
54 void ITVRestart(uint Chanid, uint Cardid, bool IsLiveTV);
55 void AdjustSubtitleZoom(int Delta);
56 void AdjustSubtitleDelay(std::chrono::milliseconds Delta);
57
58 private slots:
59 void ExternalSubtitlesUpdated();
60 void SetStream(const QString& Stream);
61 void SetStreamPos(std::chrono::milliseconds Position);
62 void StreamPlay(bool Playing = true);
63
64 protected:
65 double SafeFPS();
66 void DoDisableForcedSubtitles();
67 void DoEnableForcedSubtitles();
68 void LoadExternalSubtitles();
69
71 MythCaptionsState m_captionsState { };
72 bool m_textDesired { false };
73 uint m_lastTextDisplayMode { kDisplayNone };
74 uint m_lastValidTextDisplayMode { kDisplayNone };
75 InteractiveTV *m_interactiveTV { nullptr };
76 QMutex m_itvLock;
77 bool m_itvEnabled { false };
78 bool m_itvVisible { false };
79 QString m_newStream;
80
81 private:
82 void DisableTeletext();
83 bool HasCaptionTrack(uint Mode);
84 uint NextCaptionTrack(uint Mode);
85};
86
87#endif
An action (for this plugin) consists of a description, and a set of key sequences.
Definition: action.h:41
This is the interface between an MHEG engine and a MythTV TV object.
Definition: interactivetv.h:18
Acts as the interface between the UI and the underlying AudioPlayer object.
void InitialiseState() override
Initialise audio and signal initial state.
void SetInteractiveStreamPos(std::chrono::milliseconds Position)
void CaptionsStateChanged(MythCaptionsState &CaptionsState)
void PlayInteractiveStream(bool Play)
MythCaptionsOverlay m_captionsOverlay
void EnableSubtitles(bool Enable)
void ResizeForInteractiveTV(const QRect &Rect)
void SetInteractiveStream(const QString &Stream)
virtual InteractiveTV * GetInteractiveTV()
Definition: mythplayer.h:163
virtual void tracksChanged(uint TrackType)
Definition: mythplayer.h:206
Control TV playback.
Definition: tv_play.h:156
TrackType
Track types.
Definition: decoderbase.h:27
unsigned int uint
Definition: freesurround.h:24
PlayerFlags
Definition: mythplayer.h:65
#define MTV_PUBLIC
Definition: mythtvexp.h:15
Mode
Definition: synaesthesia.h:23
@ kDisplayNone
Definition: videoouttypes.h:12