]> git.vomp.tv Git - vompclient.git/blob - recinfo.h
Display channel name, duration, resume point and size on recording info screen
[vompclient.git] / recinfo.h
1 /*
2     Copyright 2019 Chris Tallon
3
4     This file is part of VOMP.
5
6     VOMP is free software; you can redistribute it and/or modify
7     it under the terms of the GNU General Public License as published by
8     the Free Software Foundation; either version 2 of the License, or
9     (at your option) any later version.
10
11     VOMP is distributed in the hope that it will be useful,
12     but WITHOUT ANY WARRANTY; without even the implied warranty of
13     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14     GNU General Public License for more details.
15
16     You should have received a copy of the GNU General Public License
17     along with VOMP; if not, write to the Free Software
18     Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
19 */
20 //portions from vdr by Klaus Schmiding HSMF code
21
22 #ifndef RECINFO_H
23 #define RECINFO_H
24
25 #include <time.h>
26
27 #include "defines.h"
28
29 typedef struct _hmsf
30 {
31   UINT hours;
32   UINT minutes;
33   UINT seconds;
34   UINT frames;
35 } hmsf;
36
37 class RecInfo
38 {
39   public:
40     RecInfo();
41     ~RecInfo();
42
43     time_t timerStart;
44     time_t timerEnd;
45     ULONG resumePoint;
46     char* summary;
47
48         double fps;
49
50     ULONG numComponents;
51     UCHAR* streams;
52     UCHAR* types;
53     char** languages;
54     char** descriptions;
55
56     char *title;
57
58     char* channelName;
59     ULONG duration;
60     ULONG fileSize;
61     ULONG priority;
62     ULONG lifetime;
63
64     void setNumComponents(ULONG);
65     void addComponent(ULONG componentNum, UCHAR tstream, UCHAR ttype, char* tlanguage, char* tdescription);
66     // addComponent accepts a pointer to a buffer that RecInfo will free, not the caller
67     char* buildSummaryWithDetails();
68
69     void print();
70
71     hmsf framesToHMSF(ULONG frames);
72     bool hasNoVideo();
73
74   private:
75     char* summaryWithDetails;
76 };
77
78 #endif