File: setup.h

package info (click to toggle)
vdr-plugin-markad 4.2.15-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,084 kB
  • sloc: cpp: 22,441; python: 613; makefile: 270; sh: 95
file content (90 lines) | stat: -rw-r--r-- 2,606 bytes parent folder | download
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
81
82
83
84
85
86
87
88
89
90
/*
 * setup.h: A plugin for the Video Disk Recorder
 *
 * See the README file for copyright information and how to reach the author.
 *
 */
#ifndef __setup_h_
#define __setup_h_

#include <vdr/menuitems.h>


#define PROCESS_AFTER 0
#define PROCESS_DURING 1
#define PROCESS_NEVER 2


struct setup {
    int ProcessDuring      = PROCESS_NEVER;
    bool useVPS            = false;
    bool logVPS            = false;
    bool whileRecording    = false;;
    bool whileReplaying    = false;;
    bool OSDMessage        = false;
    int  svdrPort          = 6419;
    bool Verbose           = false;
    bool HideMainMenuEntry = false;
    bool Log2Rec           = false;
    bool LogoOnly          = false;
    bool DeferredShutdown  = false;
    const char *LogoDir    = nullptr;
    char *LogLevel         = nullptr;
    char *aStopOffs        = nullptr;
    bool MarkadCut         = false;
    bool ac3ReEncode       = false;
    int autoLogoConf       = -1;
    int autoLogoMenu       = 2;
    bool fulldecode        = false;
    int hwaccel            = 0;
    const char *PluginName = nullptr;
#define MAX_HWACCEL 7
    const char *hwaccelTexts[MAX_HWACCEL] = {tr("off"), "vaapi", "vdpau", "vulkan", "cuda", "drm", "opencl"};
};


class cSetupMarkAd : public cMenuSetupPage {
private:
    void write(void);

    const char *processTexts[3]           = {};
    const char *autoLogoTexts[3]          = {};

    struct setup *setup          = nullptr;
    int autologomenu             = 0;
    int fulldecode               = 0;
    int hwaccel                  = 0;
    int processduring            = 0;
    int usevps                   = 0;
    int logvps                   = 0;
    int whilerecording           = 0;
    int whilereplaying           = 0;
    int osdmsg                   = 0;
    int svdrPort                 = 6419;
    int verbose                  = 0;
    int hidemainmenuentry        = 0;
    int log2rec                  = 0;
    int logoonly                 = 0;
    int deferredshutdown         = 0;
    int lpos                     = 0;
protected:
    virtual void Store(void);
public:
    explicit cSetupMarkAd(struct setup *Setup);
    eOSState ProcessKey(eKeys Key);
};


class cSetupMarkAdList : public cOsdMenu {
public:
    explicit cSetupMarkAdList(struct setup *Setup);
    eOSState ProcessKey(eKeys Key);
};


class cSetupMarkAdListItem : public cOsdItem {
public:
    explicit cSetupMarkAdListItem(const char *Text, eOSState State=osUnknown,bool Selectable=true):cOsdItem(Text,State,Selectable) { }
    virtual int Compare(const cListObject &ListObject) const;
};
#endif