-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathgroup__cpp__kodi__addon__pvr.html
334 lines (332 loc) · 41.2 KB
/
group__cpp__kodi__addon__pvr.html
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
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.9.1"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Kodi Development: PVR</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function() { init_search(); });
/* @license-end */
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectlogo"><img alt="Logo" src="kodi-dev.png"/></td>
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">Kodi Development
 <span id="projectnumber">20.0</span>
</div>
<div id="projectbrief">for Binary and Script based Add-Ons</div>
</td>
<td> <div id="MSearchBox" class="MSearchBoxInactive">
<span class="left">
<img id="MSearchSelect" src="search/mag_sel.svg"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
alt=""/>
<input type="text" id="MSearchField" value="Search" accesskey="S"
onfocus="searchBox.OnSearchFieldFocus(true)"
onblur="searchBox.OnSearchFieldFocus(false)"
onkeyup="searchBox.OnSearchFieldChange(event)"/>
</span><span class="right">
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.svg" alt=""/></a>
</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.1 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search','.html');
/* @license-end */
</script>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
<div id="nav-tree">
<div id="nav-tree-contents">
<div id="nav-sync" class="sync"></div>
</div>
</div>
<div id="splitbar" style="-moz-user-select:none;"
class="ui-resizable-handle">
</div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('group__cpp__kodi__addon__pvr.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<div class="header">
<div class="summary">
<a href="#groups">Modules</a> </div>
<div class="headertitle">
<div class="title">PVR<div class="ingroups"><a class="el" href="group__cpp.html">C++</a> » <a class="el" href="group__cpp__kodi__addon.html">Interface - kodi::addon</a> » <a class="el" href="group__cpp__kodi__addon__instances.html">Addon type instances</a></div></div> </div>
</div><!--header-->
<div class="contents">
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<p> <h4><code><span style="font-style: italic;">Class: </span><span style="font-style: bold;"><font color=31363b><big> kodi::addon::CInstancePVRClient </big></font></span></code></h4> <b>PVR client add-on instance</b> </p>
<p>Kodi features powerful <a href="https://kodi.wiki/view/Live_TV">Live TV</a> and <a href="http://en.wikipedia.org/wiki/Digital_video_recorder">video recording (DVR/PVR)</a> abilities using a very flexible distributed application structure. That is, by leveraging other existing third-party <a href="https://kodi.wiki/view/PVR_backend">PVR backend applications</a> or <a href="https://kodi.wiki/view/PVR_backend">DVR devices</a> that specialize in receiving television signals and also support the same type of <a href="http://en.wikipedia.org/wiki/client%E2%80%93server_model">client–server model</a> which Kodi uses, (following a <a href="http://en.wikipedia.org/wiki/Front_and_back_ends">frontend-backend</a> design principle for <a href="http://en.wikipedia.org/wiki/Separation_of_concerns">separation of concerns</a>), these PVR features in Kodi allow you to watch Live TV, listen to radio, view an EPG TV-Guide and schedule recordings, and also enables many other TV related features, all using Kodi as your primary interface once the initial pairing connection and configuration have been done.</p>
<dl class="section note"><dt>Note</dt><dd>It is very important to understand that with "Live TV" in the reference to PVR in Kodi, we do not mean <a href="http://en.wikipedia.org/wiki/Streaming_media">streaming video</a> from the internet via websites providing <a href="https://kodi.wiki/view/Free_content">free content</a> or online services such as Netflix, Hulu, Vudu and similar, no matter if that content is actually streamed live or not. If that is what you are looking for then you might want to look into <a href="https://kodi.wiki/view/Add-ons">Video Addons</a> for Kodi instead, (which again is not the same as the "PVR" or "Live TV" we discuss in this article), but remember that <a href="https://kodi.wiki/view/Free_content">Kodi does not provide any video content or video streaming services</a>.</dd></dl>
<p>The use of the PVR is based on the <a class="el" href="classkodi_1_1addon_1_1_c_instance_p_v_r_client.html">CInstancePVRClient</a>.</p>
<p>Include the header #include <kodi/addon-instance/PVR.h> to use this class.</p>
<hr />
<p>Here is an example of what the <b><code>addon.xml.in</code></b> would look like for an PVR addon:</p>
<div class="fragment"><div class="line"><?<span class="keyword">xml</span> <span class="keyword">version</span>=<span class="stringliteral">"1.0"</span> <span class="keyword">encoding</span>=<span class="stringliteral">"UTF-8"</span>?></div>
<div class="line"><<span class="keywordtype">addon</span></div>
<div class="line"> <span class="keyword">id</span>=<span class="stringliteral">"pvr.myspecialnamefor"</span></div>
<div class="line"> <span class="keyword">version</span>=<span class="stringliteral">"1.0.0"</span></div>
<div class="line"> <span class="keyword">name</span>=<span class="stringliteral">"My special PVR addon"</span></div>
<div class="line"> <span class="keyword">provider-name</span>=<span class="stringliteral">"Your Name"</span>></div>
<div class="line"> <<span class="keywordtype">requires</span>>@<span class="keyword">ADDON_DEPENDS</span>@</<span class="keywordtype">requires</span>></div>
<div class="line"> <<span class="keywordtype">extension</span></div>
<div class="line"> <span class="keyword">point</span>=<span class="stringliteral">"kodi.pvrclient"</span></div>
<div class="line"> <span class="keyword">library_</span>@<span class="keyword">PLATFORM</span>@=<span class="stringliteral">"@LIBRARY_FILENAME@"</span>/></div>
<div class="line"> <<span class="keywordtype">extension</span> <span class="keyword">point</span>=<span class="stringliteral">"xbmc.addon.metadata"</span>></div>
<div class="line"> <<span class="keywordtype">summary</span> <span class="keyword">lang</span>=<span class="stringliteral">"en_GB"</span>><span class="keyword">My</span> <span class="keyword">PVR</span> <span class="keyword">addon</span> <span class="keyword">addon</span></<span class="keywordtype">summary</span>></div>
<div class="line"> <<span class="keywordtype">description</span> <span class="keyword">lang</span>=<span class="stringliteral">"en_GB"</span>><span class="keyword">My</span> <span class="keyword">PVR</span> <span class="keyword">addon</span> <span class="keyword">description</span></<span class="keywordtype">description</span>></div>
<div class="line"> <<span class="keywordtype">platform</span>>@<span class="keyword">PLATFORM</span>@</<span class="keywordtype">platform</span>></div>
<div class="line"> </<span class="keywordtype">extension</span>></div>
<div class="line"></<span class="keywordtype">addon</span>></div>
</div><!-- fragment --><p>At <b><code><extension point="kodi.pvrclient" ...></code></b> the basic instance definition is declared, this is intended to identify the addon as an PVR and to see its supported types: </p><table class="markdownTable">
<tr class="markdownTableHead">
<th class="markdownTableHeadNone">Name </th><th class="markdownTableHeadNone">Description </th></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone"><b><code>point</code></b> </td><td class="markdownTableBodyNone">The identification of the addon instance to inputstream is mandatory <b><code>kodi.pvrclient</code></b>. In addition, the instance declared in the first <b><code><extension ... /></code></b> is also the main type of addon. </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone"><b><code>library_@PLATFORM@</code></b> </td><td class="markdownTableBodyNone">The runtime library used for the addon. This is usually declared by cmake and correctly displayed in the translated <code>addon.xml</code>. </td></tr>
</table>
<dl class="section remark"><dt>Remarks</dt><dd>For more detailed description of the <b><code>addon.xml</code></b>, see also <a href="https://kodi.wiki/view/Addon.xml">https://kodi.wiki/view/Addon.xml</a>.</dd></dl>
<hr />
<p><b>Example:</b></p>
<div class="fragment"><div class="line"><span class="preprocessor">#include <kodi/addon-instance/PVR.h></span></div>
<div class="line"> </div>
<div class="line"><span class="keyword">class </span>CMyPVRClient : <span class="keyword">public</span> <a class="code" href="classkodi_1_1addon_1_1_c_instance_p_v_r_client.html">::kodi::addon::CInstancePVRClient</a></div>
<div class="line">{</div>
<div class="line"><span class="keyword">public</span>:</div>
<div class="line"> CMyPVRClient(KODI_HANDLE instance, <span class="keyword">const</span> std::string& kodiVersion);</div>
<div class="line"> </div>
<div class="line"> <a class="code" href="group__cpp__kodi__addon__pvr___defs___general___p_v_r___e_r_r_o_r.html#ga4cf1fba691fffe5b92e8f27159673894">PVR_ERROR</a> GetCapabilities(<a class="code" href="classkodi_1_1addon_1_1_p_v_r_capabilities.html">kodi::addon::PVRCapabilities</a>& capabilities) <span class="keyword">override</span>;</div>
<div class="line"> <a class="code" href="group__cpp__kodi__addon__pvr___defs___general___p_v_r___e_r_r_o_r.html#ga4cf1fba691fffe5b92e8f27159673894">PVR_ERROR</a> GetBackendName(std::string& name) <span class="keyword">override</span>;</div>
<div class="line"> <a class="code" href="group__cpp__kodi__addon__pvr___defs___general___p_v_r___e_r_r_o_r.html#ga4cf1fba691fffe5b92e8f27159673894">PVR_ERROR</a> GetBackendVersion(std::string& version) <span class="keyword">override</span>;</div>
<div class="line"> </div>
<div class="line"> <a class="code" href="group__cpp__kodi__addon__pvr___defs___general___p_v_r___e_r_r_o_r.html#ga4cf1fba691fffe5b92e8f27159673894">PVR_ERROR</a> GetProvidersAmount(<span class="keywordtype">int</span>& amount) <span class="keyword">override</span>;</div>
<div class="line"> <a class="code" href="group__cpp__kodi__addon__pvr___defs___general___p_v_r___e_r_r_o_r.html#ga4cf1fba691fffe5b92e8f27159673894">PVR_ERROR</a> GetProviders(std::vector<kodi::addon::PVRProvider>& providers) <span class="keyword">override</span>;</div>
<div class="line"> <a class="code" href="group__cpp__kodi__addon__pvr___defs___general___p_v_r___e_r_r_o_r.html#ga4cf1fba691fffe5b92e8f27159673894">PVR_ERROR</a> GetChannelsAmount(<span class="keywordtype">int</span>& amount) <span class="keyword">override</span>;</div>
<div class="line"> <a class="code" href="group__cpp__kodi__addon__pvr___defs___general___p_v_r___e_r_r_o_r.html#ga4cf1fba691fffe5b92e8f27159673894">PVR_ERROR</a> GetChannels(<span class="keywordtype">bool</span> radio, std::vector<kodi::addon::PVRChannel>& channels) <span class="keyword">override</span>;</div>
<div class="line"> <a class="code" href="group__cpp__kodi__addon__pvr___defs___general___p_v_r___e_r_r_o_r.html#ga4cf1fba691fffe5b92e8f27159673894">PVR_ERROR</a> GetChannelStreamProperties(<span class="keyword">const</span> <a class="code" href="classkodi_1_1addon_1_1_p_v_r_channel.html">kodi::addon::PVRChannel</a>& channel,</div>
<div class="line"> std::vector<kodi::addon::PVRStreamProperty>& properties) <span class="keyword">override</span>;</div>
<div class="line"> </div>
<div class="line"><span class="keyword">private</span>:</div>
<div class="line"> std::vector<kodi::addon::PVRChannel> m_myChannels;</div>
<div class="line">};</div>
<div class="line"> </div>
<div class="line">CMyPVRClient::CMyPVRClient(KODI_HANDLE instance, <span class="keyword">const</span> std::string& kodiVersion)</div>
<div class="line"> : CInstancePVRClient(instance, kodiVersion)</div>
<div class="line">{</div>
<div class="line"> <a class="code" href="classkodi_1_1addon_1_1_p_v_r_channel.html">kodi::addon::PVRChannel</a> channel;</div>
<div class="line"> channel.<a class="code" href="group__cpp__kodi__addon__pvr___defs___channel___p_v_r_channel.html#gaeed8afa4cf3a382808d6f24ffc86ae3b">SetUniqueId</a>(123);</div>
<div class="line"> channel.<a class="code" href="group__cpp__kodi__addon__pvr___defs___channel___p_v_r_channel.html#ga6c60822100d7394bb5eff26cff51addb">SetChannelNumber</a>(1);</div>
<div class="line"> channel.<a class="code" href="group__cpp__kodi__addon__pvr___defs___channel___p_v_r_channel.html#ga1cc011bd1a07e3dbac3b007078c2008e">SetChannelName</a>(<span class="stringliteral">"My test channel"</span>);</div>
<div class="line"> m_myChannels.push_back(channel);</div>
<div class="line">}</div>
<div class="line"> </div>
<div class="line"><a class="code" href="group__cpp__kodi__addon__pvr___defs___general___p_v_r___e_r_r_o_r.html#ga4cf1fba691fffe5b92e8f27159673894">PVR_ERROR</a> CMyPVRClient::GetCapabilities(<a class="code" href="classkodi_1_1addon_1_1_p_v_r_capabilities.html">kodi::addon::PVRCapabilities</a>& capabilities)</div>
<div class="line">{</div>
<div class="line"> capabilities.<a class="code" href="group__cpp__kodi__addon__pvr___defs___p_v_r_capabilities.html#ga4ee5eedf0f04a9aca791cf3d486195c7">SetSupportsTV</a>(<span class="keyword">true</span>);</div>
<div class="line"> <span class="keywordflow">return</span> <a class="code" href="group__cpp__kodi__addon__pvr___defs___general___p_v_r___e_r_r_o_r.html#gga4cf1fba691fffe5b92e8f27159673894af0b0d4ad6cc0f3f31b583016cb289358">PVR_ERROR_NO_ERROR</a>;</div>
<div class="line">}</div>
<div class="line"> </div>
<div class="line"><a class="code" href="group__cpp__kodi__addon__pvr___defs___general___p_v_r___e_r_r_o_r.html#ga4cf1fba691fffe5b92e8f27159673894">PVR_ERROR</a> CMyPVRClient::GetBackendName(std::string& name)</div>
<div class="line">{</div>
<div class="line"> name = <span class="stringliteral">"My special PVR client"</span>;</div>
<div class="line"> <span class="keywordflow">return</span> <a class="code" href="group__cpp__kodi__addon__pvr___defs___general___p_v_r___e_r_r_o_r.html#gga4cf1fba691fffe5b92e8f27159673894af0b0d4ad6cc0f3f31b583016cb289358">PVR_ERROR_NO_ERROR</a>;</div>
<div class="line">}</div>
<div class="line"> </div>
<div class="line"><a class="code" href="group__cpp__kodi__addon__pvr___defs___general___p_v_r___e_r_r_o_r.html#ga4cf1fba691fffe5b92e8f27159673894">PVR_ERROR</a> CMyPVRClient::GetBackendVersion(std::string& version)</div>
<div class="line">{</div>
<div class="line"> version = <span class="stringliteral">"1.0.0"</span>;</div>
<div class="line"> <span class="keywordflow">return</span> <a class="code" href="group__cpp__kodi__addon__pvr___defs___general___p_v_r___e_r_r_o_r.html#gga4cf1fba691fffe5b92e8f27159673894af0b0d4ad6cc0f3f31b583016cb289358">PVR_ERROR_NO_ERROR</a>;</div>
<div class="line">}</div>
<div class="line"> </div>
<div class="line"><a class="code" href="group__cpp__kodi__addon__pvr___defs___general___p_v_r___e_r_r_o_r.html#ga4cf1fba691fffe5b92e8f27159673894">PVR_ERROR</a> CMyInstance::GetProvidersAmount(<span class="keywordtype">int</span>& amount)</div>
<div class="line">{</div>
<div class="line"> amount = m_myProviders.size();</div>
<div class="line"> <span class="keywordflow">return</span> <a class="code" href="group__cpp__kodi__addon__pvr___defs___general___p_v_r___e_r_r_o_r.html#gga4cf1fba691fffe5b92e8f27159673894af0b0d4ad6cc0f3f31b583016cb289358">PVR_ERROR_NO_ERROR</a>;</div>
<div class="line">}</div>
<div class="line"> </div>
<div class="line"><a class="code" href="group__cpp__kodi__addon__pvr___defs___general___p_v_r___e_r_r_o_r.html#ga4cf1fba691fffe5b92e8f27159673894">PVR_ERROR</a> CMyPVRClient::GetProviders(std::vector<kodi::addon::PVRProvider>& providers)</div>
<div class="line">{</div>
<div class="line"> providers = m_myProviders;</div>
<div class="line"> <span class="keywordflow">return</span> <a class="code" href="group__cpp__kodi__addon__pvr___defs___general___p_v_r___e_r_r_o_r.html#gga4cf1fba691fffe5b92e8f27159673894af0b0d4ad6cc0f3f31b583016cb289358">PVR_ERROR_NO_ERROR</a>;</div>
<div class="line">}</div>
<div class="line"> </div>
<div class="line"><a class="code" href="group__cpp__kodi__addon__pvr___defs___general___p_v_r___e_r_r_o_r.html#ga4cf1fba691fffe5b92e8f27159673894">PVR_ERROR</a> CMyInstance::GetChannelsAmount(<span class="keywordtype">int</span>& amount)</div>
<div class="line">{</div>
<div class="line"> amount = m_myChannels.size();</div>
<div class="line"> <span class="keywordflow">return</span> <a class="code" href="group__cpp__kodi__addon__pvr___defs___general___p_v_r___e_r_r_o_r.html#gga4cf1fba691fffe5b92e8f27159673894af0b0d4ad6cc0f3f31b583016cb289358">PVR_ERROR_NO_ERROR</a>;</div>
<div class="line">}</div>
<div class="line"> </div>
<div class="line"><a class="code" href="group__cpp__kodi__addon__pvr___defs___general___p_v_r___e_r_r_o_r.html#ga4cf1fba691fffe5b92e8f27159673894">PVR_ERROR</a> CMyPVRClient::GetChannels(<span class="keywordtype">bool</span> radio, std::vector<kodi::addon::PVRChannel>& channels)</div>
<div class="line">{</div>
<div class="line"> channels = m_myChannels;</div>
<div class="line"> <span class="keywordflow">return</span> <a class="code" href="group__cpp__kodi__addon__pvr___defs___general___p_v_r___e_r_r_o_r.html#gga4cf1fba691fffe5b92e8f27159673894af0b0d4ad6cc0f3f31b583016cb289358">PVR_ERROR_NO_ERROR</a>;</div>
<div class="line">}</div>
<div class="line"> </div>
<div class="line"><a class="code" href="group__cpp__kodi__addon__pvr___defs___general___p_v_r___e_r_r_o_r.html#ga4cf1fba691fffe5b92e8f27159673894">PVR_ERROR</a> CMyPVRClient::GetChannelStreamProperties(<span class="keyword">const</span> <a class="code" href="classkodi_1_1addon_1_1_p_v_r_channel.html">kodi::addon::PVRChannel</a>& channel,</div>
<div class="line"> std::vector<kodi::addon::PVRStreamProperty>& properties)</div>
<div class="line">{</div>
<div class="line"> <span class="keywordflow">if</span> (channel.<a class="code" href="group__cpp__kodi__addon__pvr___defs___channel___p_v_r_channel.html#gaf9429b6e2f07313e24a3438c8c967c04">GetUniqueId</a>() == 123)</div>
<div class="line"> {</div>
<div class="line"> properties.push_back(<a class="code" href="group__cpp__kodi__addon__pvr___defs___general___p_v_r___s_t_r_e_a_m___p_r_o_p_e_r_t_y.html#gaa1b0ba3fdd694d04a172b161e8c3f4e1">PVR_STREAM_PROPERTY_STREAMURL</a>, <span class="stringliteral">"http://distribution.bbb3d.renderfarming.net/video/mp4/bbb_sunflower_1080p_30fps_normal.mp4"</span>);</div>
<div class="line"> properties.push_back(<a class="code" href="group__cpp__kodi__addon__pvr___defs___general___p_v_r___s_t_r_e_a_m___p_r_o_p_e_r_t_y.html#gafa156042549c6e7db82997239976eb90">PVR_STREAM_PROPERTY_ISREALTIMESTREAM</a>, <span class="stringliteral">"true"</span>);</div>
<div class="line"> <span class="keywordflow">return</span> <a class="code" href="group__cpp__kodi__addon__pvr___defs___general___p_v_r___e_r_r_o_r.html#gga4cf1fba691fffe5b92e8f27159673894af0b0d4ad6cc0f3f31b583016cb289358">PVR_ERROR_NO_ERROR</a>;</div>
<div class="line"> }</div>
<div class="line"> <span class="keywordflow">return</span> <a class="code" href="group__cpp__kodi__addon__pvr___defs___general___p_v_r___e_r_r_o_r.html#gga4cf1fba691fffe5b92e8f27159673894a63989e31bbf8946a44234af0cf14bbb8">PVR_ERROR_UNKNOWN</a>;</div>
<div class="line">}</div>
<div class="line"> </div>
<div class="line">...</div>
<div class="line"> </div>
<div class="line"><span class="comment">//----------------------------------------------------------------------</span></div>
<div class="line"> </div>
<div class="line">class CMyAddon : public ::kodi::addon::CAddonBase</div>
<div class="line">{</div>
<div class="line"><span class="keyword">public</span>:</div>
<div class="line"> CMyAddon() = <span class="keywordflow">default</span>;</div>
<div class="line"> <a class="code" href="group__cpp__kodi__addon__addonbase___defs___a_d_d_o_n___s_t_a_t_u_s.html#ga335347495ed00620451a69cfe3494502">ADDON_STATUS</a> CreateInstance(<span class="keywordtype">int</span> instanceType,</div>
<div class="line"> <span class="keyword">const</span> std::string& instanceID,</div>
<div class="line"> KODI_HANDLE instance,</div>
<div class="line"> <span class="keyword">const</span> std::string& version,</div>
<div class="line"> KODI_HANDLE& addonInstance) <span class="keyword">override</span>;</div>
<div class="line">};</div>
<div class="line"> </div>
<div class="line"><span class="comment">// If you use only one instance in your add-on, can be instanceType and</span></div>
<div class="line"><span class="comment">// instanceID ignored</span></div>
<div class="line"><a class="code" href="group__cpp__kodi__addon__addonbase___defs___a_d_d_o_n___s_t_a_t_u_s.html#ga335347495ed00620451a69cfe3494502">ADDON_STATUS</a> CMyAddon::CreateInstance(<span class="keywordtype">int</span> instanceType,</div>
<div class="line"> <span class="keyword">const</span> std::string& instanceID,</div>
<div class="line"> KODI_HANDLE instance,</div>
<div class="line"> <span class="keyword">const</span> std::string& version,</div>
<div class="line"> KODI_HANDLE& addonInstance)</div>
<div class="line">{</div>
<div class="line"> <span class="keywordflow">if</span> (instanceType == <a class="code" href="group__cpp__kodi__addon__addonbase___defs___a_d_d_o_n___t_y_p_e.html#ggada0b4c3c9f9c168e5e1c27145ec72357a03d18c7f11906e96aa27f91d482aae9e">ADDON_INSTANCE_PVR</a>)</div>
<div class="line"> {</div>
<div class="line"> <a class="code" href="group__cpp__kodi.html#gaaa1f205f9375cd086229a1455ede11cc">kodi::Log</a>(<a class="code" href="group__cpp__kodi___defs___addon_log.html#gga913895aaf2ef685961947f8d6b93e038a63f8ea3699765964c764b141bf41e9cc">ADDON_LOG_INFO</a>, <span class="stringliteral">"Creating my PVR client instance"</span>);</div>
<div class="line"> addonInstance = <span class="keyword">new</span> CMyPVRClient(instance, version);</div>
<div class="line"> <span class="keywordflow">return</span> <a class="code" href="group__cpp__kodi__addon__addonbase___defs___a_d_d_o_n___s_t_a_t_u_s.html#gga335347495ed00620451a69cfe3494502a6925909b93ca05098ca5272f16e091c0">ADDON_STATUS_OK</a>;</div>
<div class="line"> }</div>
<div class="line"> <span class="keywordflow">else</span> <span class="keywordflow">if</span> (...)</div>
<div class="line"> {</div>
<div class="line"> ...</div>
<div class="line"> }</div>
<div class="line"> <span class="keywordflow">return</span> <a class="code" href="group__cpp__kodi__addon__addonbase___defs___a_d_d_o_n___s_t_a_t_u_s.html#gga335347495ed00620451a69cfe3494502ac0720dbdce3dcb194f12a0eceb59a501">ADDON_STATUS_UNKNOWN</a>;</div>
<div class="line">}</div>
<div class="line"> </div>
<div class="line">ADDONCREATOR(CMyAddon)</div>
<div class="ttc" id="aclasskodi_1_1addon_1_1_c_instance_p_v_r_client_html"><div class="ttname"><a href="classkodi_1_1addon_1_1_c_instance_p_v_r_client.html">kodi::addon::CInstancePVRClient</a></div><div class="ttdef"><b>Definition:</b> PVR.h:408</div></div>
<div class="ttc" id="aclasskodi_1_1addon_1_1_p_v_r_capabilities_html"><div class="ttname"><a href="classkodi_1_1addon_1_1_p_v_r_capabilities.html">kodi::addon::PVRCapabilities</a></div><div class="ttdef"><b>Definition:</b> General.h:116</div></div>
<div class="ttc" id="aclasskodi_1_1addon_1_1_p_v_r_channel_html"><div class="ttname"><a href="classkodi_1_1addon_1_1_p_v_r_channel.html">kodi::addon::PVRChannel</a></div><div class="ttdef"><b>Definition:</b> Channels.h:39</div></div>
<div class="ttc" id="agroup__cpp__kodi___defs___addon_log_html_gga913895aaf2ef685961947f8d6b93e038a63f8ea3699765964c764b141bf41e9cc"><div class="ttname"><a href="group__cpp__kodi___defs___addon_log.html#gga913895aaf2ef685961947f8d6b93e038a63f8ea3699765964c764b141bf41e9cc">ADDON_LOG_INFO</a></div><div class="ttdeci">@ ADDON_LOG_INFO</div><div class="ttdoc">1 : To include information messages in the log file.</div><div class="ttdef"><b>Definition:</b> addon_base.h:177</div></div>
<div class="ttc" id="agroup__cpp__kodi__addon__addonbase___defs___a_d_d_o_n___s_t_a_t_u_s_html_ga335347495ed00620451a69cfe3494502"><div class="ttname"><a href="group__cpp__kodi__addon__addonbase___defs___a_d_d_o_n___s_t_a_t_u_s.html#ga335347495ed00620451a69cfe3494502">ADDON_STATUS</a></div><div class="ttdeci">ADDON_STATUS</div><div class="ttdef"><b>Definition:</b> addon_base.h:128</div></div>
<div class="ttc" id="agroup__cpp__kodi__addon__addonbase___defs___a_d_d_o_n___s_t_a_t_u_s_html_gga335347495ed00620451a69cfe3494502a6925909b93ca05098ca5272f16e091c0"><div class="ttname"><a href="group__cpp__kodi__addon__addonbase___defs___a_d_d_o_n___s_t_a_t_u_s.html#gga335347495ed00620451a69cfe3494502a6925909b93ca05098ca5272f16e091c0">ADDON_STATUS_OK</a></div><div class="ttdeci">@ ADDON_STATUS_OK</div><div class="ttdoc">For everything OK and no error.</div><div class="ttdef"><b>Definition:</b> addon_base.h:130</div></div>
<div class="ttc" id="agroup__cpp__kodi__addon__addonbase___defs___a_d_d_o_n___s_t_a_t_u_s_html_gga335347495ed00620451a69cfe3494502ac0720dbdce3dcb194f12a0eceb59a501"><div class="ttname"><a href="group__cpp__kodi__addon__addonbase___defs___a_d_d_o_n___s_t_a_t_u_s.html#gga335347495ed00620451a69cfe3494502ac0720dbdce3dcb194f12a0eceb59a501">ADDON_STATUS_UNKNOWN</a></div><div class="ttdeci">@ ADDON_STATUS_UNKNOWN</div><div class="ttdoc">Unknown and incomprehensible error.</div><div class="ttdef"><b>Definition:</b> addon_base.h:142</div></div>
<div class="ttc" id="agroup__cpp__kodi__addon__addonbase___defs___a_d_d_o_n___t_y_p_e_html_ggada0b4c3c9f9c168e5e1c27145ec72357a03d18c7f11906e96aa27f91d482aae9e"><div class="ttname"><a href="group__cpp__kodi__addon__addonbase___defs___a_d_d_o_n___t_y_p_e.html#ggada0b4c3c9f9c168e5e1c27145ec72357a03d18c7f11906e96aa27f91d482aae9e">ADDON_INSTANCE_PVR</a></div><div class="ttdeci">@ ADDON_INSTANCE_PVR</div><div class="ttdoc">Game instance, see kodi::addon::CInstancePVRClient.</div><div class="ttdef"><b>Definition:</b> versions.h:232</div></div>
<div class="ttc" id="agroup__cpp__kodi__addon__pvr___defs___channel___p_v_r_channel_html_ga1cc011bd1a07e3dbac3b007078c2008e"><div class="ttname"><a href="group__cpp__kodi__addon__pvr___defs___channel___p_v_r_channel.html#ga1cc011bd1a07e3dbac3b007078c2008e">kodi::addon::PVRChannel::SetChannelName</a></div><div class="ttdeci">void SetChannelName(const std::string &channelName)</div><div class="ttdoc">optional Channel name given to this channel.</div><div class="ttdef"><b>Definition:</b> Channels.h:111</div></div>
<div class="ttc" id="agroup__cpp__kodi__addon__pvr___defs___channel___p_v_r_channel_html_ga6c60822100d7394bb5eff26cff51addb"><div class="ttname"><a href="group__cpp__kodi__addon__pvr___defs___channel___p_v_r_channel.html#ga6c60822100d7394bb5eff26cff51addb">kodi::addon::PVRChannel::SetChannelNumber</a></div><div class="ttdeci">void SetChannelNumber(unsigned int channelNumber)</div><div class="ttdoc">optional Channel number of this channel on the backend.</div><div class="ttdef"><b>Definition:</b> Channels.h:91</div></div>
<div class="ttc" id="agroup__cpp__kodi__addon__pvr___defs___channel___p_v_r_channel_html_gaeed8afa4cf3a382808d6f24ffc86ae3b"><div class="ttname"><a href="group__cpp__kodi__addon__pvr___defs___channel___p_v_r_channel.html#gaeed8afa4cf3a382808d6f24ffc86ae3b">kodi::addon::PVRChannel::SetUniqueId</a></div><div class="ttdeci">void SetUniqueId(unsigned int uniqueId)</div><div class="ttdoc">required Unique identifier for this channel.</div><div class="ttdef"><b>Definition:</b> Channels.h:77</div></div>
<div class="ttc" id="agroup__cpp__kodi__addon__pvr___defs___channel___p_v_r_channel_html_gaf9429b6e2f07313e24a3438c8c967c04"><div class="ttname"><a href="group__cpp__kodi__addon__pvr___defs___channel___p_v_r_channel.html#gaf9429b6e2f07313e24a3438c8c967c04">kodi::addon::PVRChannel::GetUniqueId</a></div><div class="ttdeci">unsigned int GetUniqueId() const</div><div class="ttdoc">To get with SetUniqueId changed values.</div><div class="ttdef"><b>Definition:</b> Channels.h:80</div></div>
<div class="ttc" id="agroup__cpp__kodi__addon__pvr___defs___general___p_v_r___e_r_r_o_r_html_ga4cf1fba691fffe5b92e8f27159673894"><div class="ttname"><a href="group__cpp__kodi__addon__pvr___defs___general___p_v_r___e_r_r_o_r.html#ga4cf1fba691fffe5b92e8f27159673894">PVR_ERROR</a></div><div class="ttdeci">PVR_ERROR</div><div class="ttdef"><b>Definition:</b> pvr_general.h:35</div></div>
<div class="ttc" id="agroup__cpp__kodi__addon__pvr___defs___general___p_v_r___e_r_r_o_r_html_gga4cf1fba691fffe5b92e8f27159673894a63989e31bbf8946a44234af0cf14bbb8"><div class="ttname"><a href="group__cpp__kodi__addon__pvr___defs___general___p_v_r___e_r_r_o_r.html#gga4cf1fba691fffe5b92e8f27159673894a63989e31bbf8946a44234af0cf14bbb8">PVR_ERROR_UNKNOWN</a></div><div class="ttdeci">@ PVR_ERROR_UNKNOWN</div><div class="ttdoc">-1 : An unknown error occurred.</div><div class="ttdef"><b>Definition:</b> pvr_general.h:40</div></div>
<div class="ttc" id="agroup__cpp__kodi__addon__pvr___defs___general___p_v_r___e_r_r_o_r_html_gga4cf1fba691fffe5b92e8f27159673894af0b0d4ad6cc0f3f31b583016cb289358"><div class="ttname"><a href="group__cpp__kodi__addon__pvr___defs___general___p_v_r___e_r_r_o_r.html#gga4cf1fba691fffe5b92e8f27159673894af0b0d4ad6cc0f3f31b583016cb289358">PVR_ERROR_NO_ERROR</a></div><div class="ttdeci">@ PVR_ERROR_NO_ERROR</div><div class="ttdoc">0 : No error occurred.</div><div class="ttdef"><b>Definition:</b> pvr_general.h:37</div></div>
<div class="ttc" id="agroup__cpp__kodi__addon__pvr___defs___general___p_v_r___s_t_r_e_a_m___p_r_o_p_e_r_t_y_html_gaa1b0ba3fdd694d04a172b161e8c3f4e1"><div class="ttname"><a href="group__cpp__kodi__addon__pvr___defs___general___p_v_r___s_t_r_e_a_m___p_r_o_p_e_r_t_y.html#gaa1b0ba3fdd694d04a172b161e8c3f4e1">PVR_STREAM_PROPERTY_STREAMURL</a></div><div class="ttdeci">#define PVR_STREAM_PROPERTY_STREAMURL</div><div class="ttdoc">the URL of the stream that should be played.</div><div class="ttdef"><b>Definition:</b> pvr_general.h:154</div></div>
<div class="ttc" id="agroup__cpp__kodi__addon__pvr___defs___general___p_v_r___s_t_r_e_a_m___p_r_o_p_e_r_t_y_html_gafa156042549c6e7db82997239976eb90"><div class="ttname"><a href="group__cpp__kodi__addon__pvr___defs___general___p_v_r___s_t_r_e_a_m___p_r_o_p_e_r_t_y.html#gafa156042549c6e7db82997239976eb90">PVR_STREAM_PROPERTY_ISREALTIMESTREAM</a></div><div class="ttdeci">#define PVR_STREAM_PROPERTY_ISREALTIMESTREAM</div><div class="ttdoc">"true" to denote that the stream that should be played is a realtime stream.</div><div class="ttdef"><b>Definition:</b> pvr_general.h:244</div></div>
<div class="ttc" id="agroup__cpp__kodi__addon__pvr___defs___p_v_r_capabilities_html_ga4ee5eedf0f04a9aca791cf3d486195c7"><div class="ttname"><a href="group__cpp__kodi__addon__pvr___defs___p_v_r_capabilities.html#ga4ee5eedf0f04a9aca791cf3d486195c7">kodi::addon::PVRCapabilities::SetSupportsTV</a></div><div class="ttdeci">void SetSupportsTV(bool supportsTV)</div><div class="ttdoc">Set true if this add-on provides TV channels.</div><div class="ttdef"><b>Definition:</b> General.h:175</div></div>
<div class="ttc" id="agroup__cpp__kodi_html_gaaa1f205f9375cd086229a1455ede11cc"><div class="ttname"><a href="group__cpp__kodi.html#gaaa1f205f9375cd086229a1455ede11cc">kodi::Log</a></div><div class="ttdeci">void ATTRIBUTE_HIDDEN Log(const AddonLog loglevel, const char *format,...)</div><div class="ttdoc">Add a message to Kodi's log.</div><div class="ttdef"><b>Definition:</b> AddonBase.h:749</div></div>
</div><!-- fragment --><p>The destruction of the example class <code>CMyPVRClient</code> is called from Kodi's header. Manually deleting the add-on instance is not required. </p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="groups"></a>
Modules</h2></td></tr>
<tr class="memitem:group__cpp__kodi__addon__pvr___defs"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__cpp__kodi__addon__pvr___defs.html">Definitions, structures and enumerators</a></td></tr>
<tr class="memdesc:group__cpp__kodi__addon__pvr___defs"><td class="mdescLeft"> </td><td class="mdescRight"><b>PVR client add-on instance definition values</b><br />
All PVR functions associated data structures. <br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:group__cpp__kodi__addon__pvr___base"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__cpp__kodi__addon__pvr___base.html">1. Basic functions</a></td></tr>
<tr class="memdesc:group__cpp__kodi__addon__pvr___base"><td class="mdescLeft"> </td><td class="mdescRight"><b>Functions to manage the addon and get basic information about it</b><br />
These are e.g. <a class="el" href="group__cpp__kodi__addon__pvr___base.html#ga9372606e2545340cb38f3d9b17fb7b54">GetCapabilities</a> to know supported groups at this addon or the others to get information about the source of the PVR stream. <br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:group__cpp__kodi__addon__pvr___channels"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__cpp__kodi__addon__pvr___channels.html">2. Channels (required)</a></td></tr>
<tr class="memdesc:group__cpp__kodi__addon__pvr___channels"><td class="mdescLeft"> </td><td class="mdescRight"><b>Functions to get available TV or Radio channels</b><br />
These are mandatory functions for using this addon to get the available channels. <br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:group__cpp__kodi__addon__pvr__supports_channel_groups"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__cpp__kodi__addon__pvr__supports_channel_groups.html">3. Channel Groups (optional)</a></td></tr>
<tr class="memdesc:group__cpp__kodi__addon__pvr__supports_channel_groups"><td class="mdescLeft"> </td><td class="mdescRight"><b>Bring in this functions if you have set <a class="el" href="group__cpp__kodi__addon__pvr___defs___p_v_r_capabilities.html#ga3b6d35a66f3bb9279f2b4ad9f1746657">supportsChannelGroups</a> to true</b><br />
This is used to divide available addon channels into groups, which can then be selected by the user. <br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:group__cpp__kodi__addon__pvr__supports_channel_edit"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__cpp__kodi__addon__pvr__supports_channel_edit.html">4. Channel edit (optional)</a></td></tr>
<tr class="memdesc:group__cpp__kodi__addon__pvr__supports_channel_edit"><td class="mdescLeft"> </td><td class="mdescRight"><b>Bring in this functions if you have set <a class="el" href="group__cpp__kodi__addon__pvr___defs___p_v_r_capabilities.html#ga36031a6f2b1994828bf78bb688b60ca3">supportsChannelSettings</a> to true or for <a class="el" href="group__cpp__kodi__addon__pvr__supports_channel_edit.html#ga59f9e538066139807b9b7a8b54bddb5c">OpenDialogChannelScan()</a> set <a class="el" href="group__cpp__kodi__addon__pvr___defs___p_v_r_capabilities.html#gada470e0cb72ba410b8bff139ae184e02">supportsChannelScan</a> to true</b><br />
The support of this is a pure option and not mandatory. <br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:group__cpp__kodi__addon__pvr___e_p_g_tag"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__cpp__kodi__addon__pvr___e_p_g_tag.html">4. EPG methods (optional)</a></td></tr>
<tr class="memdesc:group__cpp__kodi__addon__pvr___e_p_g_tag"><td class="mdescLeft"> </td><td class="mdescRight"><b>PVR EPG methods</b><br />
These C ++ class functions of are intended for processing EPG information and for giving it to Kodi. <br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:group__cpp__kodi__addon__pvr___recordings"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__cpp__kodi__addon__pvr___recordings.html">5. Recordings (optional)</a></td></tr>
<tr class="memdesc:group__cpp__kodi__addon__pvr___recordings"><td class="mdescLeft"> </td><td class="mdescRight"><b>PVR recording methods</b><br />
To transfer available recordings of the PVR backend and to allow possible playback. <br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:group__cpp__kodi__addon__pvr___timers"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__cpp__kodi__addon__pvr___timers.html">6. Timers (optional)</a></td></tr>
<tr class="memdesc:group__cpp__kodi__addon__pvr___timers"><td class="mdescLeft"> </td><td class="mdescRight"><b>PVR timer methods</b><br />
For editing and displaying timed work, such as video recording. <br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:group__cpp__kodi__addon__pvr___power_management"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__cpp__kodi__addon__pvr___power_management.html">7. Power management events (optional)</a></td></tr>
<tr class="memdesc:group__cpp__kodi__addon__pvr___power_management"><td class="mdescLeft"> </td><td class="mdescRight"><b>Used to notify the pvr addon for power management events</b><br />
Used to allow any energy savings. <br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:group__cpp__kodi__addon__pvr___streams"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__cpp__kodi__addon__pvr___streams.html">8. Inputstream</a></td></tr>
<tr class="memdesc:group__cpp__kodi__addon__pvr___streams"><td class="mdescLeft"> </td><td class="mdescRight"><b>PVR Inputstream</b><br />
This includes functions that are used in the PVR inputstream. <br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
</table>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.1 </li>
</ul>
</div>
</body>
</html>