File: vps.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 (85 lines) | stat: -rw-r--r-- 1,826 bytes parent folder | download | duplicates (2)
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
/*
 * vps.h: A program for the Video Disk Recorder
 *
 * See the README file for copyright information and how to reach the author.
 *
 */

#ifndef __vps_h_
#define __vps_h_

#include "marks.h"

/**
 * class for VPS events
 */
class cVPS {
public:

    /**
     * cVPS constructor
     */
    explicit cVPS(const char *directory);

    /**
     * cVPS destructor
     */
    ~cVPS();

    /**
     * get VPS start event offset
     * @return offset from start of recording in s
     */
    int GetStart() const {
        return vpsStart;
    };

    /**
     * get VPS stop event offset
     * @return offset from start of recording in s
     */
    int GetStop() const {
        return vpsStop;
    };

    /**
     * set VPS stop event offset
     */
    void SetStop(const int state) {
        vpsStop = state;
    };

    /**
     * status of VPD timer recording
     * @return true if recorded was controlled by VPS timer
     */
    bool IsVPSTimer() const {
        return isVPStimer;
    }

    /**
     * get length of broadcast based on VPS events
     * @return length of recording in s
     */
    int Length() const;

    /**
     * log match of start and end mark with VPS events
     * @param channel name of channel
     * @param marks object with all marks
     */
    void LogMatch(char *channel, cMarks *marks) const;

private:
    int vpsStart      = -1;    //!< VPS start event offset from recodering start in s
    //!<
    int vpsStop       = -1;    //!< VPS stop event offset from recodering start in s
    //!<
    int vpsPauseStart = -1;    //!< VPS pause start event offset from recodering start in s
    //!<
    int vpsPauseStop  = -1;    //!< VPS pause start event offset from recodering start in s
    //!<
    bool isVPStimer   = false; //!< recorded by VPS controlled timer
    //!<
};
#endif