forked from olivier-etienne/multicat-supervisor
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy patheit.h
133 lines (112 loc) · 3.58 KB
/
eit.h
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
/*****************************************************************************
* eit.h: Utils for the multicat program
*****************************************************************************
* Copyright (C) 2009, 2011, 2014 VideoLAN
* $Id: util.h 59 2014-08-09 14:09:10Z massiot $
*
* Authors: Christophe Massiot <[email protected]>
*
* 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.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
#ifndef EIT_H_INCLUDED
#define EIT_H_INCLUDED
#define TEXTANDDESC_TEXT_LENGTH 32
#define TEXTANDDESC_DESC_LENGTH 128
#define SHORTEVENTDESC_NAME_LENGTH 64
#define SHORTEVENTDESC_TEXT_LENGTH 128
#define SHORTEVENTDESC_LANG_LENGTH 3
#define EXTEVENTDESC_TEXT_LENGTH 128
#define EXTEVENTDESC_LANG_LENGTH 3
#define EXTEVENTDESC_ITEM_SIZE 3
#define COMPONENTDESC_SIZE 3
#define COMPONENTDESC_TEXT_LENGTH 64
#define COMPONENTDESC_LANG_LENGTH 3
#define CA_SYSTEM_ID_SIZE 10
#define CONTENT_DESC_SIZE 10
//#define STARTTIME_LENGTH 5
#define PARENTALRATINGDESC_COUNTRY_CODE_LENGTH 3
struct TextAndDesc
{
char text[TEXTANDDESC_TEXT_LENGTH+1];
char desc[TEXTANDDESC_DESC_LENGTH+1];
};
struct ShortEventDesc
{
char event_name[SHORTEVENTDESC_NAME_LENGTH+1];
char event_text[SHORTEVENTDESC_TEXT_LENGTH+1];
char event_lang[SHORTEVENTDESC_LANG_LENGTH+1];
};
struct ExtEventDesc
{
char text[EXTEVENTDESC_TEXT_LENGTH+1];
char lang[EXTEVENTDESC_LANG_LENGTH+1];
struct TextAndDesc items[EXTEVENTDESC_ITEM_SIZE];
};
struct ComponentDesc
{
uint8_t stream_content;
uint8_t component_type;
uint8_t set_component_tag;
char text[COMPONENTDESC_TEXT_LENGTH+1];
char lang[COMPONENTDESC_LANG_LENGTH+1];
};
struct ParentalRatingDesc
{
char country_code[PARENTALRATINGDESC_COUNTRY_CODE_LENGTH+1];
uint8_t age;
};
struct ContentDesc
{
int level_1;
int level_2;
int user;
};
struct CAIdentifierDesc
{
int CASystemId[CA_SYSTEM_ID_SIZE];
};
struct ShortSmoothingBufferDesc
{
int sbLeakRate;
};
struct EitInfoSection {
//char startTime[STARTTIME_LENGTH+1];
long starttime;
int duration;
int event_id;
struct ShortEventDesc short_event_desc;
struct ExtEventDesc ext_event_desc;
struct ComponentDesc component_desc[COMPONENTDESC_SIZE];
struct ParentalRatingDesc parent_rating_desc;
struct ContentDesc content_desc[CONTENT_DESC_SIZE];
struct CAIdentifierDesc ca_identifier_desc;
struct ShortSmoothingBufferDesc short_smoothing_Buffer_desc;
};
struct EitInfo
{
short initialized;
short updated;
int programNumber;
uint16_t tsid;
uint16_t sid;
uint16_t onid;
struct EitInfoSection section0;
struct EitInfoSection section1;
};
/*****************************************************************************
* Prototypes
*****************************************************************************/
int add_eit(struct EitInfo * eit_struct,int providerNumber,uint8_t *p_write_buffer,size_t i_payload_size,uint8_t ** output,size_t *ouput_length);
#endif // EIT_H_INCLUDED