summaryrefslogtreecommitdiff
path: root/hlsPlayerControl.h
blob: b777c40fdcf17e827d451bdd5cdbf024a5ee6f49 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
#ifndef HLSPLAYERCONTROL_H
#define HLSPLAYERCONTROL_H

#include <vdr/player.h>
#include <vdr/tools.h>

#include "hlsPlayer.h"
#include "MediaContainer.h"
#include "PVideo.h"

class cStreamSelectMenu : public cOsdMenu {
private:
    plexclient::cVideo *pVideo;

    void CreateMenu();

    bool SelectStream();

public:
    cStreamSelectMenu(plexclient::cVideo *Video);

    virtual eOSState ProcessKey(eKeys Keys);
};

class cHlsPlayerControl : public cControl {
private:
    static volatile int active;
    cHlsPlayer *player;
    std::string m_title;

    cStreamSelectMenu *menu;
    cSkinDisplayReplay *displayReplay;
    bool visible, modeOnly, shown;
    int lastCurrent, lastTotal;
    bool lastPlay, lastForward;
    int lastSpeed;
    time_t timeoutShow;

    void ShowMode(void);

    bool ShowProgress(bool Initial);

    void ShowTimed(int Seconds = 0);

protected:
    //void ShowMode();

public:
    plexclient::cVideo m_Video;

    static cControl *Create(plexclient::cVideo Video);

    cHlsPlayerControl(cHlsPlayer *Player, plexclient::cVideo Video);

    virtual ~cHlsPlayerControl();

    virtual void Show(void);

    virtual void Hide(void);

    virtual cString GetHeader(void);

    virtual eOSState ProcessKey(eKeys Key);

    bool Active(void);

    void Pause(void);

    void Play(void);

    void Stop(void);

    void SeekTo(int offset);

    void JumpRelative(int offset);


};

#endif // HLSPLAYERCONTROL_H