/usr/include/libsi/section.h is in vdr-dev 2.2.0-5build1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 | /***************************************************************************
* Copyright (c) 2003 by Marcel Wiesweg *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
* $Id: section.h 3.0 2012/02/26 13:58:26 kls Exp $
* *
***************************************************************************/
#ifndef LIBSI_SECTION_H
#define LIBSI_SECTION_H
#include <time.h>
#include "si.h"
#include "headers.h"
namespace SI {
class PAT : public NumberedSection {
public:
PAT(const unsigned char *data, bool doCopy=true) : NumberedSection(data, doCopy) {}
PAT() {}
class Association : public LoopElement {
public:
int getServiceId() const;
int getPid() const;
bool isNITPid() const { return getServiceId()==0; }
virtual int getLength() { return int(sizeof(pat_prog)); }
protected:
virtual void Parse();
private:
const pat_prog *s;
};
int getTransportStreamId() const;
StructureLoop<Association> associationLoop;
protected:
virtual void Parse();
private:
const pat *s;
};
class CAT : public NumberedSection {
public:
CAT(const unsigned char *data, bool doCopy=true) : NumberedSection(data, doCopy) {}
CAT() {}
DescriptorLoop loop;
protected:
virtual void Parse();
};
class PMT : public NumberedSection {
public:
PMT(const unsigned char *data, bool doCopy=true) : NumberedSection(data, doCopy) {}
PMT() {}
class Stream : public LoopElement {
public:
int getPid() const;
int getStreamType() const;
DescriptorLoop streamDescriptors;
virtual int getLength() { return int(sizeof(pmt_info)+streamDescriptors.getLength()); }
protected:
virtual void Parse();
private:
const pmt_info *s;
};
DescriptorLoop commonDescriptors;
StructureLoop<Stream> streamLoop;
int getServiceId() const;
int getPCRPid() const;
protected:
virtual void Parse();
private:
const pmt *s;
};
class TSDT : public NumberedSection {
public:
TSDT(const unsigned char *data, bool doCopy=true) : NumberedSection(data, doCopy) {}
TSDT() {}
DescriptorLoop transportStreamDescriptors;
protected:
virtual void Parse();
private:
const tsdt *s;
};
class NIT : public NumberedSection {
public:
NIT(const unsigned char *data, bool doCopy=true) : NumberedSection(data, doCopy) {}
NIT() {}
class TransportStream : public LoopElement {
public:
int getTransportStreamId() const;
int getOriginalNetworkId() const;
virtual int getLength() { return int(sizeof(ni_ts)+transportStreamDescriptors.getLength()); }
DescriptorLoop transportStreamDescriptors;
protected:
virtual void Parse();
private:
const ni_ts *s;
};
DescriptorLoop commonDescriptors;
StructureLoop<TransportStream> transportStreamLoop;
int getNetworkId() const;
protected:
virtual void Parse();
private:
const nit *s;
};
//BAT has the same structure as NIT but different allowed descriptors
class BAT : public NIT {
public:
BAT(const unsigned char *data, bool doCopy=true) : NIT(data, doCopy) {}
BAT() {}
int getBouquetId() const { return getNetworkId(); }
};
class SDT : public NumberedSection {
public:
SDT(const unsigned char *data, bool doCopy=true) : NumberedSection(data, doCopy) {}
SDT() {}
class Service : public LoopElement {
public:
int getServiceId() const;
int getEITscheduleFlag() const;
int getEITpresentFollowingFlag() const;
RunningStatus getRunningStatus() const;
int getFreeCaMode() const;
virtual int getLength() { return int(sizeof(sdt_descr)+serviceDescriptors.getLength()); }
DescriptorLoop serviceDescriptors;
protected:
virtual void Parse();
private:
const sdt_descr *s;
};
int getTransportStreamId() const;
int getOriginalNetworkId() const;
StructureLoop<Service> serviceLoop;
protected:
virtual void Parse();
private:
const sdt *s;
};
class EIT : public NumberedSection {
public:
EIT(const unsigned char *data, bool doCopy=true) : NumberedSection(data, doCopy) {}
EIT() {}
class Event : public LoopElement {
public:
int getEventId() const;
time_t getStartTime() const; //UTC
time_t getDuration() const;
int getMJD() const;
int getStartTimeHour() const; //UTC
int getStartTimeMinute() const; //UTC
int getStartTimeSecond() const; //UTC
int getDurationHour() const;
int getDurationMinute() const;
int getDurationSecond() const;
RunningStatus getRunningStatus() const;
int getFreeCaMode() const;
DescriptorLoop eventDescriptors;
virtual int getLength() { return int(sizeof(eit_event)+eventDescriptors.getLength()); }
protected:
virtual void Parse();
private:
const eit_event *s;
};
int getServiceId() const;
int getTransportStreamId() const;
int getOriginalNetworkId() const;
int getSegmentLastSectionNumber() const;
int getLastTableId() const;
StructureLoop<Event> eventLoop;
//true if table conveys present/following information, false if it conveys schedule information
bool isPresentFollowing() const;
//true if table describes TS on which it is broadcast, false if it describes other TS
bool isActualTS() const;
protected:
virtual void Parse();
private:
const eit *s;
};
class TDT : public Section {
public:
TDT(const unsigned char *data, bool doCopy=true) : Section(data, doCopy) {}
TDT() {}
time_t getTime() const; //UTC
protected:
virtual void Parse();
private:
const tdt *s;
};
class TOT : public CRCSection {
public:
TOT(const unsigned char *data, bool doCopy=true) : CRCSection(data, doCopy) {}
TOT() {}
time_t getTime() const;
DescriptorLoop descriptorLoop;
protected:
virtual void Parse();
private:
const tot *s;
};
class RST : public Section {
public:
RST(const unsigned char *data, bool doCopy=true) : Section(data, doCopy) {}
RST() {}
class RunningInfo : public LoopElement {
public:
int getTransportStreamId() const;
int getOriginalNetworkId() const;
int getServiceId() const;
int getEventId() const;
RunningStatus getRunningStatus() const;
virtual int getLength() { return int(sizeof(rst_info)); }
protected:
virtual void Parse();
private:
const rst_info *s;
};
StructureLoop<RunningInfo> infoLoop;
protected:
virtual void Parse();
};
class AIT : public NumberedSection {
public:
AIT(const unsigned char *data, bool doCopy=true) : NumberedSection(data, doCopy) {}
AIT() {}
class Application : public LoopElement {
public:
virtual int getLength() { return int(sizeof(ait_app)+applicationDescriptors.getLength()); }
long getOrganisationId() const;
int getApplicationId() const;
int getControlCode() const;
MHP_DescriptorLoop applicationDescriptors;
protected:
virtual void Parse();
const ait_app *s;
};
MHP_DescriptorLoop commonDescriptors;
StructureLoop<Application> applicationLoop;
int getApplicationType() const;
int getAITVersion() const;
protected:
const ait *first;
virtual void Parse();
};
/* Premiere Content Information Table */
class PremiereCIT : public NumberedSection {
public:
PremiereCIT(const unsigned char *data, bool doCopy=true) : NumberedSection(data, doCopy) {}
PremiereCIT() {}
int getContentId() const;
time_t getDuration() const;
PCIT_DescriptorLoop eventDescriptors;
protected:
virtual void Parse();
private:
const pcit *s;
};
} //end of namespace
#endif //LIBSI_TABLE_H
|