summaryrefslogtreecommitdiffstats
path: root/xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance
diff options
context:
space:
mode:
authormanuel <manuel@mausz.at>2021-03-04 23:36:40 +0100
committermanuel <manuel@mausz.at>2021-03-04 23:36:40 +0100
commit3cb8aa05f8cee9e860cf83531682ff0ed4af6a4f (patch)
tree921f4829b32126f80f9113c124f2e14c0ebce8d9 /xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance
parentbe933ef2241d79558f91796cc5b3a161f72ebf9c (diff)
downloadkodi-pvr-build-Matrix.tar.gz
kodi-pvr-build-Matrix.tar.bz2
kodi-pvr-build-Matrix.zip
sync with upstreamMatrix
Diffstat (limited to 'xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance')
-rw-r--r--xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/CMakeLists.txt2
-rw-r--r--xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/audio_decoder.h2
-rw-r--r--xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/audio_encoder.h2
-rw-r--r--xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/game.h2
-rw-r--r--xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/image_decoder.h2
-rw-r--r--xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/inputstream.h703
-rw-r--r--xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/inputstream/CMakeLists.txt9
-rw-r--r--xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/inputstream/demux_packet.h117
-rw-r--r--xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/inputstream/stream_codec.h131
-rw-r--r--xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/inputstream/stream_constants.h49
-rw-r--r--xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/inputstream/stream_crypto.h129
-rw-r--r--xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/inputstream/timing_constants.h42
-rw-r--r--xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/peripheral.h2
-rw-r--r--xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/pvr.h14
-rw-r--r--xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/pvr/pvr_channel_groups.h2
-rw-r--r--xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/pvr/pvr_channels.h2
-rw-r--r--xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/pvr/pvr_defines.h2
-rw-r--r--xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/pvr/pvr_edl.h2
-rw-r--r--xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/pvr/pvr_epg.h2
-rw-r--r--xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/pvr/pvr_general.h9
-rw-r--r--xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/pvr/pvr_menu_hook.h2
-rw-r--r--xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/pvr/pvr_recordings.h2
-rw-r--r--xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/pvr/pvr_stream.h9
-rw-r--r--xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/pvr/pvr_timers.h2
-rw-r--r--xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/screensaver.h5
-rw-r--r--xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/vfs.h4
-rw-r--r--xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/video_codec.h261
-rw-r--r--xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/visualization.h5
28 files changed, 1461 insertions, 54 deletions
diff --git a/xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/CMakeLists.txt b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/CMakeLists.txt
index 4edd034..b5d0382 100644
--- a/xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/CMakeLists.txt
+++ b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/CMakeLists.txt
@@ -2,10 +2,12 @@ set(HEADERS audio_decoder.h
2 audio_encoder.h 2 audio_encoder.h
3 game.h 3 game.h
4 image_decoder.h 4 image_decoder.h
5 inputstream.h
5 peripheral.h 6 peripheral.h
6 pvr.h 7 pvr.h
7 screensaver.h 8 screensaver.h
8 vfs.h 9 vfs.h
10 video_codec.h
9 visualization.h) 11 visualization.h)
10 12
11if(NOT ENABLE_STATIC_LIBS) 13if(NOT ENABLE_STATIC_LIBS)
diff --git a/xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/audio_decoder.h b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/audio_decoder.h
index 8b75ddb..be6ad16 100644
--- a/xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/audio_decoder.h
+++ b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/audio_decoder.h
@@ -6,8 +6,6 @@
6 * See LICENSES/README.md for more information. 6 * See LICENSES/README.md for more information.
7 */ 7 */
8 8
9#pragma once
10
11#ifndef C_API_ADDONINSTANCE_AUDIO_DECODER_H 9#ifndef C_API_ADDONINSTANCE_AUDIO_DECODER_H
12#define C_API_ADDONINSTANCE_AUDIO_DECODER_H 10#define C_API_ADDONINSTANCE_AUDIO_DECODER_H
13 11
diff --git a/xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/audio_encoder.h b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/audio_encoder.h
index 6f24d1c..b9f2ab5 100644
--- a/xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/audio_encoder.h
+++ b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/audio_encoder.h
@@ -6,8 +6,6 @@
6 * See LICENSES/README.md for more information. 6 * See LICENSES/README.md for more information.
7 */ 7 */
8 8
9#pragma once
10
11#ifndef C_API_ADDONINSTANCE_AUDIO_ENCODER_H 9#ifndef C_API_ADDONINSTANCE_AUDIO_ENCODER_H
12#define C_API_ADDONINSTANCE_AUDIO_ENCODER_H 10#define C_API_ADDONINSTANCE_AUDIO_ENCODER_H
13 11
diff --git a/xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/game.h b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/game.h
index c97fa5d..b1de817 100644
--- a/xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/game.h
+++ b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/game.h
@@ -6,8 +6,6 @@
6 * See LICENSES/README.md for more information. 6 * See LICENSES/README.md for more information.
7 */ 7 */
8 8
9#pragma once
10
11#ifndef C_API_ADDONINSTANCE_GAME_H 9#ifndef C_API_ADDONINSTANCE_GAME_H
12#define C_API_ADDONINSTANCE_GAME_H 10#define C_API_ADDONINSTANCE_GAME_H
13 11
diff --git a/xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/image_decoder.h b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/image_decoder.h
index 6455b38..7093212 100644
--- a/xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/image_decoder.h
+++ b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/image_decoder.h
@@ -6,8 +6,6 @@
6 * See LICENSES/README.md for more information. 6 * See LICENSES/README.md for more information.
7 */ 7 */
8 8
9#pragma once
10
11#ifndef C_API_ADDONINSTANCE_IMAGE_DECODER_H 9#ifndef C_API_ADDONINSTANCE_IMAGE_DECODER_H
12#define C_API_ADDONINSTANCE_IMAGE_DECODER_H 10#define C_API_ADDONINSTANCE_IMAGE_DECODER_H
13 11
diff --git a/xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/inputstream.h b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/inputstream.h
new file mode 100644
index 0000000..1b3a735
--- /dev/null
+++ b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/inputstream.h
@@ -0,0 +1,703 @@
1/*
2 * Copyright (C) 2005-2018 Team Kodi
3 * This file is part of Kodi - https://kodi.tv
4 *
5 * SPDX-License-Identifier: GPL-2.0-or-later
6 * See LICENSES/README.md for more information.
7 */
8
9#ifndef C_API_ADDONINSTANCE_INPUTSTREAM_H
10#define C_API_ADDONINSTANCE_INPUTSTREAM_H
11
12#include "../addon_base.h"
13#include "inputstream/demux_packet.h"
14#include "inputstream/stream_codec.h"
15#include "inputstream/stream_constants.h"
16#include "inputstream/stream_crypto.h"
17#include "inputstream/timing_constants.h"
18
19#include <time.h>
20
21// Increment this level always if you add features which can lead to compile failures in the addon
22#define INPUTSTREAM_VERSION_LEVEL 4
23
24#define INPUTSTREAM_MAX_INFO_COUNT 8
25#define INPUTSTREAM_MAX_STREAM_COUNT 256
26#define INPUTSTREAM_MAX_STRING_NAME_SIZE 256
27#define INPUTSTREAM_MAX_STRING_CODEC_SIZE 32
28#define INPUTSTREAM_MAX_STRING_LANGUAGE_SIZE 64
29
30#ifdef __cplusplus
31extern "C"
32{
33#endif /* __cplusplus */
34
35 //==============================================================================
36 /// @ingroup cpp_kodi_addon_inputstream_Defs_Interface_InputstreamCapabilities
37 /// @brief **Capability types of inputstream addon.**\n
38 /// This values are needed to tell Kodi which options are supported on the addon.
39 ///
40 /// If one of this is defined, then the corresponding methods from
41 /// @ref cpp_kodi_addon_inputstream "kodi::addon::CInstanceInputStream" need
42 /// to be implemented.
43 ///
44 /// Used on @ref kodi::addon::CInstanceInputStream::GetCapabilities().
45 ///
46 ///@{
47 enum INPUTSTREAM_MASKTYPE
48 {
49 /// @brief **0000 0000 0000 0001 :** Supports interface demuxing.
50 ///
51 /// If set must be @ref cpp_kodi_addon_inputstream_Demux "Demux support" included.
52 INPUTSTREAM_SUPPORTS_IDEMUX = (1 << 0),
53
54 /// @brief **0000 0000 0000 0010 :** Supports interface position time.
55 ///
56 /// This means that the start time and the current stream time are used.
57 ///
58 /// If set must be @ref cpp_kodi_addon_inputstream_Time "Time support" included.
59 INPUTSTREAM_SUPPORTS_IPOSTIME = (1 << 1),
60
61 /// @brief **0000 0000 0000 0100 :** Supports interface for display time.
62 ///
63 /// This will call up the complete stream time information. The start time
64 /// and the individual PTS times are then given using @ref cpp_kodi_addon_inputstream_Defs_Times.
65 ///
66 /// If set must be @ref cpp_kodi_addon_inputstream_Times "Times support" included.
67 INPUTSTREAM_SUPPORTS_IDISPLAYTIME = (1 << 2),
68
69 /// @brief **0000 0000 0000 1000 :** Supports seek
70 INPUTSTREAM_SUPPORTS_SEEK = (1 << 3),
71
72 /// @brief **0000 0000 0001 0000 :** Supports pause
73 INPUTSTREAM_SUPPORTS_PAUSE = (1 << 4),
74
75 /// @brief **0000 0000 0010 0000 :** Supports interface to give position time.
76 ///
77 /// This will only ask for the current time of the stream, not for length or
78 /// start.
79 ///
80 /// If set must be @ref cpp_kodi_addon_inputstream_PosTime "Position time support" included.
81 INPUTSTREAM_SUPPORTS_ITIME = (1 << 5),
82
83 /// @brief **0000 0000 0100 0000 :** Supports interface for chapter selection.
84 ///
85 /// If set must be @ref cpp_kodi_addon_inputstream_Chapter "Chapter support" included.
86 INPUTSTREAM_SUPPORTS_ICHAPTER = (1 << 6),
87 };
88 ///@}
89 //----------------------------------------------------------------------------
90
91 /*!
92 * @brief InputStream add-on capabilities. All capabilities are set to "false" as default.
93 */
94 struct INPUTSTREAM_CAPABILITIES
95 {
96 /// set of supported capabilities
97 uint32_t m_mask;
98 };
99
100 /*!
101 * @brief structure of key/value pairs passed to addon on Open()
102 */
103 struct INPUTSTREAM_PROPERTY
104 {
105 const char* m_strURL;
106 const char* m_mimeType;
107
108 unsigned int m_nCountInfoValues;
109 struct LISTITEMPROPERTY
110 {
111 const char* m_strKey;
112 const char* m_strValue;
113 } m_ListItemProperties[STREAM_MAX_PROPERTY_COUNT];
114
115 const char* m_libFolder;
116 const char* m_profileFolder;
117 };
118
119 /*!
120 * @brief Array of stream IDs
121 */
122 struct INPUTSTREAM_IDS
123 {
124 unsigned int m_streamCount;
125 unsigned int m_streamIds[INPUTSTREAM_MAX_STREAM_COUNT];
126 };
127
128 /*!
129 * @brief MASTERING Metadata
130 */
131 struct INPUTSTREAM_MASTERING_METADATA
132 {
133 double primary_r_chromaticity_x;
134 double primary_r_chromaticity_y;
135 double primary_g_chromaticity_x;
136 double primary_g_chromaticity_y;
137 double primary_b_chromaticity_x;
138 double primary_b_chromaticity_y;
139 double white_point_chromaticity_x;
140 double white_point_chromaticity_y;
141 double luminance_max;
142 double luminance_min;
143 };
144
145 /*!
146 * @brief CONTENTLIGHT Metadata
147 */
148 struct INPUTSTREAM_CONTENTLIGHT_METADATA
149 {
150 uint64_t max_cll;
151 uint64_t max_fall;
152 };
153
154 //==============================================================================
155 /// @defgroup cpp_kodi_addon_inputstream_Defs_Interface_INPUTSTREAM_TYPE enum INPUTSTREAM_TYPE
156 /// @ingroup cpp_kodi_addon_inputstream_Defs_Interface
157 /// @brief **Inputstream types**\n
158 /// To identify type on stream.
159 ///
160 /// Used on @ref kodi::addon::InputstreamInfo::SetStreamType and @ref kodi::addon::InputstreamInfo::GetStreamType.
161 ///
162 ///@{
163 enum INPUTSTREAM_TYPE
164 {
165 /// @brief **0 :** To set nothing defined
166 INPUTSTREAM_TYPE_NONE = 0,
167
168 /// @brief **1 :** To identify @ref cpp_kodi_addon_inputstream_Defs_Info as Video
169 INPUTSTREAM_TYPE_VIDEO,
170
171 /// @brief **2 :** To identify @ref cpp_kodi_addon_inputstream_Defs_Info as Audio
172 INPUTSTREAM_TYPE_AUDIO,
173
174 /// @brief **3 :** To identify @ref cpp_kodi_addon_inputstream_Defs_Info as Subtitle
175 INPUTSTREAM_TYPE_SUBTITLE,
176
177 /// @brief **4 :** To identify @ref cpp_kodi_addon_inputstream_Defs_Info as Teletext
178 INPUTSTREAM_TYPE_TELETEXT,
179
180 /// @brief **5 :** To identify @ref cpp_kodi_addon_inputstream_Defs_Info as Radio RDS
181 INPUTSTREAM_TYPE_RDS,
182 };
183 ///@}
184 //------------------------------------------------------------------------------
185
186 //==============================================================================
187 /// @defgroup cpp_kodi_addon_inputstream_Defs_Interface_INPUTSTREAM_CODEC_FEATURES enum INPUTSTREAM_CODEC_FEATURES
188 /// @ingroup cpp_kodi_addon_inputstream_Defs_Interface
189 /// @brief **Inputstream codec features**\n
190 /// To identify special extra features used for optional codec on inputstream.
191 ///
192 /// Used on @ref kodi::addon::InputstreamInfo::SetFeatures and @ref kodi::addon::InputstreamInfo::GetFeatures.
193 ///
194 /// @note These variables are bit flags which are created using "|" can be used together.
195 ///
196 ///@{
197 enum INPUTSTREAM_CODEC_FEATURES
198 {
199 /// @brief **0000 0000 0000 0000 :** Empty to set if nothing is used
200 INPUTSTREAM_FEATURE_NONE = 0,
201
202 /// @brief **0000 0000 0000 0001 :** To set addon decode should used with @ref cpp_kodi_addon_videocodec.
203 INPUTSTREAM_FEATURE_DECODE = (1 << 0)
204 };
205 ///@}
206 //----------------------------------------------------------------------------
207
208 //============================================================================
209 /// @defgroup cpp_kodi_addon_inputstream_Defs_Interface_INPUTSTREAM_FLAGS enum INPUTSTREAM_FLAGS
210 /// @ingroup cpp_kodi_addon_inputstream_Defs_Interface
211 /// @brief **Inputstream flags**\n
212 /// To identify extra stream flags used on inputstream.
213 ///
214 /// Used on @ref kodi::addon::InputstreamInfo::SetFlags and @ref kodi::addon::InputstreamInfo::GetFlags.
215 ///
216 /// @note These variables are bit flags which are created using "|" can be used together.
217 ///
218 ///@{
219 enum INPUTSTREAM_FLAGS
220 {
221 /// @brief **0000 0000 0000 0000 :** Empty to set if nothing is used
222 INPUTSTREAM_FLAG_NONE = 0,
223
224 /// @brief **0000 0000 0000 0001 :** Default
225 INPUTSTREAM_FLAG_DEFAULT = (1 << 0),
226
227 /// @brief **0000 0000 0000 0010 :** Dub
228 INPUTSTREAM_FLAG_DUB = (1 << 1),
229
230 /// @brief **0000 0000 0000 0100 :** Original
231 INPUTSTREAM_FLAG_ORIGINAL = (1 << 2),
232
233 /// @brief **0000 0000 0000 1000 :** Comment
234 INPUTSTREAM_FLAG_COMMENT = (1 << 3),
235
236 /// @brief **0000 0000 0001 0000 :** Lyrics
237 INPUTSTREAM_FLAG_LYRICS = (1 << 4),
238
239 /// @brief **0000 0000 0010 0000 :** Karaoke
240 INPUTSTREAM_FLAG_KARAOKE = (1 << 5),
241
242 /// @brief **0000 0000 0100 0000 :** Forced
243 INPUTSTREAM_FLAG_FORCED = (1 << 6),
244
245 /// @brief **0000 0000 1000 0000 :** Hearing impaired
246 INPUTSTREAM_FLAG_HEARING_IMPAIRED = (1 << 7),
247
248 /// @brief **0000 0001 0000 0000 :** Visual impaired
249 INPUTSTREAM_FLAG_VISUAL_IMPAIRED = (1 << 8),
250 };
251 ///@}
252 //----------------------------------------------------------------------------
253
254 // Keep in sync with AVColorSpace
255 //============================================================================
256 /// @defgroup cpp_kodi_addon_inputstream_Defs_Interface_INPUTSTREAM_COLORSPACE enum INPUTSTREAM_COLORSPACE
257 /// @ingroup cpp_kodi_addon_inputstream_Defs_Interface
258 /// @brief **Inputstream color space flags**\n
259 /// YUV colorspace type. These values match the ones defined by ISO/IEC 23001-8_2013 § 7.3.
260 ///
261 /// Used on @ref kodi::addon::InputstreamInfo::SetColorSpace and @ref kodi::addon::InputstreamInfo::GetColorSpace.
262 ///
263 ///@{
264 enum INPUTSTREAM_COLORSPACE
265 {
266 /// @brief **0 :** Order of coefficients is actually GBR, also IEC 61966-2-1 (sRGB)
267 INPUTSTREAM_COLORSPACE_RGB = 0,
268
269 /// @brief **1 :** Also ITU-R BT1361 / IEC 61966-2-4 xvYCC709 / SMPTE RP177 Annex B
270 INPUTSTREAM_COLORSPACE_BT709 = 1,
271
272 /// @brief **2 :** To set stream is unspecified
273 INPUTSTREAM_COLORSPACE_UNSPECIFIED = 2,
274
275 /// @brief **2 :** To set stream is unkown
276 /// @note Same as @ref INPUTSTREAM_COLORSPACE_UNSPECIFIED
277 INPUTSTREAM_COLORSPACE_UNKNOWN = INPUTSTREAM_COLORSPACE_UNSPECIFIED, // compatibility
278
279 /// @brief **3 :** To set colorspace reserved
280 INPUTSTREAM_COLORSPACE_RESERVED = 3,
281
282 /// @brief **4 :** FCC Title 47 Code of Federal Regulations 73.682 (a)(20)
283 INPUTSTREAM_COLORSPACE_FCC = 4,
284
285 /// @brief **5 :** Also ITU-R BT601-6 625 / ITU-R BT1358 625 / ITU-R BT1700 625 PAL & SECAM / IEC 61966-2-4 xvYCC601
286 INPUTSTREAM_COLORSPACE_BT470BG = 5,
287
288 /// @brief **6 :** Also ITU-R BT601-6 525 / ITU-R BT1358 525 / ITU-R BT1700 NTSC
289 INPUTSTREAM_COLORSPACE_SMPTE170M = 6,
290
291 /// @brief **7 :** Functionally identical to above @ref INPUTSTREAM_COLORSPACE_SMPTE170M
292 INPUTSTREAM_COLORSPACE_SMPTE240M = 7,
293
294 /// @brief **8 :** Used by Dirac / VC-2 and H.264 FRext, see ITU-T SG16
295 INPUTSTREAM_COLORSPACE_YCGCO = 8,
296
297 /// @brief **8 :** To set colorspace as YCOCG
298 /// @note Same as @ref INPUTSTREAM_COLORSPACE_YCGCO
299 INPUTSTREAM_COLORSPACE_YCOCG = INPUTSTREAM_COLORSPACE_YCGCO,
300
301 /// @brief **9 :** ITU-R BT2020 non-constant luminance system
302 INPUTSTREAM_COLORSPACE_BT2020_NCL = 9,
303
304 /// @brief **10 :** ITU-R BT2020 constant luminance system
305 INPUTSTREAM_COLORSPACE_BT2020_CL = 10,
306
307 /// @brief **11 :** SMPTE 2085, Y'D'zD'x
308 INPUTSTREAM_COLORSPACE_SMPTE2085 = 11,
309
310 /// @brief **12 :** Chromaticity-derived non-constant luminance system
311 INPUTSTREAM_COLORSPACE_CHROMA_DERIVED_NCL = 12,
312
313 /// @brief **13 :** Chromaticity-derived constant luminance system
314 INPUTSTREAM_COLORSPACE_CHROMA_DERIVED_CL = 13,
315
316 /// @brief **14 :** ITU-R BT.2100-0, ICtCp
317 INPUTSTREAM_COLORSPACE_ICTCP = 14,
318
319 /// @brief The maximum value to use in a list.
320 INPUTSTREAM_COLORSPACE_MAX
321 };
322 ///@}
323 //------------------------------------------------------------------------------
324
325 // Keep in sync with AVColorPrimaries
326 //==============================================================================
327 /// @defgroup cpp_kodi_addon_inputstream_Defs_Interface_INPUTSTREAM_COLORPRIMARIES enum INPUTSTREAM_COLORPRIMARIES
328 /// @ingroup cpp_kodi_addon_inputstream_Defs_Interface
329 /// @brief **Inputstream color primaries flags**\n
330 /// Chromaticity coordinates of the source primaries. These values match the ones defined by ISO/IEC 23001-8_2013 § 7.1.
331 ///
332 /// Used on @ref kodi::addon::InputstreamInfo::SetColorPrimaries and @ref kodi::addon::InputstreamInfo::GetColorPrimaries.
333 ///
334 ///@{
335 enum INPUTSTREAM_COLORPRIMARIES
336 {
337 /// @brief **0 :** Reserved
338 INPUTSTREAM_COLORPRIMARY_RESERVED0 = 0,
339
340 /// @brief **1 :** Also ITU-R BT1361 / IEC 61966-2-4 / SMPTE RP177 Annex B
341 INPUTSTREAM_COLORPRIMARY_BT709 = 1,
342
343 /// @brief **2 :** Unspecified
344 INPUTSTREAM_COLORPRIMARY_UNSPECIFIED = 2,
345
346 /// @brief **3 :** Reserved
347 INPUTSTREAM_COLORPRIMARY_RESERVED = 3,
348
349 /// @brief **4 :** Also FCC Title 47 Code of Federal Regulations 73.682 (a)(20)
350 INPUTSTREAM_COLORPRIMARY_BT470M = 4,
351
352 /// @brief **5 :** Also ITU-R BT601-6 625 / ITU-R BT1358 625 / ITU-R BT1700 625 PAL & SECAM
353 INPUTSTREAM_COLORPRIMARY_BT470BG = 5,
354
355 /// @brief **6 :** Also ITU-R BT601-6 525 / ITU-R BT1358 525 / ITU-R BT1700 NTSC
356 INPUTSTREAM_COLORPRIMARY_SMPTE170M = 6,
357
358 /// @brief **7 :** Functionally identical to above
359 INPUTSTREAM_COLORPRIMARY_SMPTE240M = 7,
360
361 /// @brief **8 :** Colour filters using Illuminant C
362 INPUTSTREAM_COLORPRIMARY_FILM = 8,
363
364 /// @brief **9 :** ITU-R BT2020
365 INPUTSTREAM_COLORPRIMARY_BT2020 = 9,
366
367 /// @brief **10 :** SMPTE ST 428-1 (CIE 1931 XYZ)
368 INPUTSTREAM_COLORPRIMARY_SMPTE428 = 10,
369
370 /// @brief **10 :**
371 /// @note Same as @ref INPUTSTREAM_COLORPRIMARY_SMPTE428
372 INPUTSTREAM_COLORPRIMARY_SMPTEST428_1 = INPUTSTREAM_COLORPRIMARY_SMPTE428,
373
374 /// @brief **11 :** SMPTE ST 431-2 (2011) / DCI P3
375 INPUTSTREAM_COLORPRIMARY_SMPTE431 = 11,
376
377 /// @brief **12 :** SMPTE ST 432-1 (2010) / P3 D65 / Display P3
378 INPUTSTREAM_COLORPRIMARY_SMPTE432 = 12,
379
380 /// @brief **22 :** JEDEC P22 phosphors
381 INPUTSTREAM_COLORPRIMARY_JEDEC_P22 = 22,
382
383 /// @brief The maximum value to use in a list.
384 INPUTSTREAM_COLORPRIMARY_MAX
385 };
386 ///@}
387 //------------------------------------------------------------------------------
388
389 // Keep in sync with AVColorRange
390 //==============================================================================
391 /// @defgroup cpp_kodi_addon_inputstream_Defs_Interface_INPUTSTREAM_COLORRANGE enum INPUTSTREAM_COLORRANGE
392 /// @ingroup cpp_kodi_addon_inputstream_Defs_Interface
393 /// @brief **Inputstream color range flags**\n
394 /// MPEG vs JPEG YUV range.
395 ///
396 /// Used on @ref kodi::addon::InputstreamInfo::SetColorRange and @ref kodi::addon::InputstreamInfo::GetColorRange.
397 ///
398 ///@{
399 enum INPUTSTREAM_COLORRANGE
400 {
401 /// @brief **0 :** To define as unkown
402 INPUTSTREAM_COLORRANGE_UNKNOWN = 0,
403
404 /// @brief **1 :** The normal 219*2^(n-8) "MPEG" YUV ranges
405 INPUTSTREAM_COLORRANGE_LIMITED,
406
407 /// @brief **2 :** The normal 2^n-1 "JPEG" YUV ranges
408 INPUTSTREAM_COLORRANGE_FULLRANGE,
409
410 /// @brief The maximum value to use in a list.
411 INPUTSTREAM_COLORRANGE_MAX
412 };
413 ///@}
414 //------------------------------------------------------------------------------
415
416 // keep in sync with AVColorTransferCharacteristic
417 //==============================================================================
418 /// @defgroup cpp_kodi_addon_inputstream_Defs_Interface_INPUTSTREAM_COLORTRC enum INPUTSTREAM_COLORTRC
419 /// @ingroup cpp_kodi_addon_inputstream_Defs_Interface
420 /// @brief **Inputstream color TRC flags**\n
421 /// Color Transfer Characteristic. These values match the ones defined by ISO/IEC 23001-8_2013 § 7.2.
422 ///
423 /// Used on @ref kodi::addon::InputstreamInfo::SetColorTransferCharacteristic and @ref kodi::addon::InputstreamInfo::GetColorTransferCharacteristic.
424 ///
425 ///@{
426 enum INPUTSTREAM_COLORTRC
427 {
428 /// @brief **0 :** Reserved
429 INPUTSTREAM_COLORTRC_RESERVED0 = 0,
430
431 /// @brief **1 :** Also ITU-R BT1361
432 INPUTSTREAM_COLORTRC_BT709 = 1,
433
434 /// @brief **2 :** Unspecified
435 INPUTSTREAM_COLORTRC_UNSPECIFIED = 2,
436
437 /// @brief **3 :** Reserved
438 INPUTSTREAM_COLORTRC_RESERVED = 3,
439
440 /// @brief **4 :** Also ITU-R BT470M / ITU-R BT1700 625 PAL & SECAM
441 INPUTSTREAM_COLORTRC_GAMMA22 = 4,
442
443 /// @brief **5 :** Also ITU-R BT470BG
444 INPUTSTREAM_COLORTRC_GAMMA28 = 5,
445
446 /// @brief **6 :** Also ITU-R BT601-6 525 or 625 / ITU-R BT1358 525 or 625 / ITU-R BT1700 NTSC
447 INPUTSTREAM_COLORTRC_SMPTE170M = 6,
448
449 /// @brief **7 :** Functionally identical to above @ref INPUTSTREAM_COLORTRC_SMPTE170M
450 INPUTSTREAM_COLORTRC_SMPTE240M = 7,
451
452 /// @brief **8 :** Linear transfer characteristics
453 INPUTSTREAM_COLORTRC_LINEAR = 8,
454
455 /// @brief **9 :** Logarithmic transfer characteristic (100:1 range)
456 INPUTSTREAM_COLORTRC_LOG = 9,
457
458 /// @brief **10 :** Logarithmic transfer characteristic (100 * Sqrt(10) : 1 range)
459 INPUTSTREAM_COLORTRC_LOG_SQRT = 10,
460
461 /// @brief **11 :** IEC 61966-2-4
462 INPUTSTREAM_COLORTRC_IEC61966_2_4 = 11,
463
464 /// @brief **12 :** ITU-R BT1361 Extended Colour Gamut
465 INPUTSTREAM_COLORTRC_BT1361_ECG = 12,
466
467 /// @brief **13 :** IEC 61966-2-1 (sRGB or sYCC)
468 INPUTSTREAM_COLORTRC_IEC61966_2_1 = 13,
469
470 /// @brief **14 :** ITU-R BT2020 for 10-bit system
471 INPUTSTREAM_COLORTRC_BT2020_10 = 14,
472
473 /// @brief **15 :** ITU-R BT2020 for 12-bit system
474 INPUTSTREAM_COLORTRC_BT2020_12 = 15,
475
476 /// @brief **16 :** SMPTE ST 2084 for 10-, 12-, 14- and 16-bit systems
477 INPUTSTREAM_COLORTRC_SMPTE2084 = 16,
478
479 /// @brief **16 :** Same as @ref INPUTSTREAM_COLORTRC_SMPTE2084
480 INPUTSTREAM_COLORTRC_SMPTEST2084 = INPUTSTREAM_COLORTRC_SMPTE2084,
481
482 /// @brief **17 :** SMPTE ST 428-1
483 INPUTSTREAM_COLORTRC_SMPTE428 = 17,
484
485 /// @brief **17 :** Same as @ref INPUTSTREAM_COLORTRC_SMPTE428
486 INPUTSTREAM_COLORTRC_SMPTEST428_1 = INPUTSTREAM_COLORTRC_SMPTE428,
487
488 /// @brief **18 :** ARIB STD-B67, known as "Hybrid log-gamma"
489 INPUTSTREAM_COLORTRC_ARIB_STD_B67 = 18,
490
491 /// @brief The maximum value to use in a list.
492 INPUTSTREAM_COLORTRC_MAX
493 };
494 ///@}
495 //------------------------------------------------------------------------------
496
497 /*!
498 * @brief stream properties
499 */
500 struct INPUTSTREAM_INFO
501 {
502 enum INPUTSTREAM_TYPE m_streamType;
503 uint32_t m_features;
504 uint32_t m_flags;
505
506 //! @brief (optional) name of the stream, \0 for default handling
507 char m_name[INPUTSTREAM_MAX_STRING_NAME_SIZE];
508
509 //! @brief (required) name of codec according to ffmpeg
510 char m_codecName[INPUTSTREAM_MAX_STRING_CODEC_SIZE];
511
512 //! @brief (optional) internal name of codec (selectionstream info)
513 char m_codecInternalName[INPUTSTREAM_MAX_STRING_CODEC_SIZE];
514
515 //! @brief (optional) the profile of the codec
516 enum STREAMCODEC_PROFILE m_codecProfile;
517
518 //! @brief (required) physical index
519 unsigned int m_pID;
520
521 const uint8_t* m_ExtraData;
522 unsigned int m_ExtraSize;
523
524 //! @brief RFC 5646 language code (empty string if undefined)
525 char m_language[INPUTSTREAM_MAX_STRING_LANGUAGE_SIZE];
526
527 //! Video stream related data
528 //@{
529
530 //! @brief Scale of 1000 and a rate of 29970 will result in 29.97 fps
531 unsigned int m_FpsScale;
532
533 unsigned int m_FpsRate;
534
535 //! @brief height of the stream reported by the demuxer
536 unsigned int m_Height;
537
538 //! @brief width of the stream reported by the demuxer
539 unsigned int m_Width;
540
541 //! @brief display aspect of stream
542 float m_Aspect;
543
544 //@}
545
546 //! Audio stream related data
547 //@{
548
549 //! @brief (required) amount of channels
550 unsigned int m_Channels;
551
552 //! @brief (required) sample rate
553 unsigned int m_SampleRate;
554
555 //! @brief (required) bit rate
556 unsigned int m_BitRate;
557
558 //! @brief (required) bits per sample
559 unsigned int m_BitsPerSample;
560
561 unsigned int m_BlockAlign;
562
563 //@}
564
565 struct STREAM_CRYPTO_SESSION m_cryptoSession;
566
567 // new in API version 2.0.8
568 //@{
569 //! @brief Codec If available, the fourcc code codec
570 unsigned int m_codecFourCC;
571
572 //! @brief definition of colorspace
573 enum INPUTSTREAM_COLORSPACE m_colorSpace;
574
575 //! @brief color range if available
576 enum INPUTSTREAM_COLORRANGE m_colorRange;
577 //@}
578
579 //new in API 2.0.9 / INPUTSTREAM_VERSION_LEVEL 1
580 //@{
581 enum INPUTSTREAM_COLORPRIMARIES m_colorPrimaries;
582 enum INPUTSTREAM_COLORTRC m_colorTransferCharacteristic;
583 //@}
584
585 //! @brief mastering static Metadata
586 struct INPUTSTREAM_MASTERING_METADATA* m_masteringMetadata;
587
588 //! @brief content light static Metadata
589 struct INPUTSTREAM_CONTENTLIGHT_METADATA* m_contentLightMetadata;
590 };
591
592 struct INPUTSTREAM_TIMES
593 {
594 time_t startTime;
595 double ptsStart;
596 double ptsBegin;
597 double ptsEnd;
598 };
599
600 /*!
601 * @brief "C" ABI Structures to transfer the methods from this to Kodi
602 */
603
604 // this are properties given to the addon on create
605 // at this time we have no parameters for the addon
606 typedef struct AddonProps_InputStream /* internal */
607 {
608 int dummy;
609 } AddonProps_InputStream;
610
611 typedef struct AddonToKodiFuncTable_InputStream /* internal */
612 {
613 KODI_HANDLE kodiInstance;
614 struct DEMUX_PACKET* (*allocate_demux_packet)(void* kodiInstance, int data_size);
615 struct DEMUX_PACKET* (*allocate_encrypted_demux_packet)(void* kodiInstance,
616 unsigned int data_size,
617 unsigned int encrypted_subsample_count);
618 void (*free_demux_packet)(void* kodiInstance, struct DEMUX_PACKET* packet);
619 } AddonToKodiFuncTable_InputStream;
620
621 struct AddonInstance_InputStream;
622 typedef struct KodiToAddonFuncTable_InputStream /* internal */
623 {
624 KODI_HANDLE addonInstance;
625
626 bool(__cdecl* open)(const struct AddonInstance_InputStream* instance,
627 struct INPUTSTREAM_PROPERTY* props);
628 void(__cdecl* close)(const struct AddonInstance_InputStream* instance);
629 const char*(__cdecl* get_path_list)(const struct AddonInstance_InputStream* instance);
630 void(__cdecl* get_capabilities)(const struct AddonInstance_InputStream* instance,
631 struct INPUTSTREAM_CAPABILITIES* capabilities);
632
633 // IDemux
634 bool(__cdecl* get_stream_ids)(const struct AddonInstance_InputStream* instance,
635 struct INPUTSTREAM_IDS* ids);
636 bool(__cdecl* get_stream)(const struct AddonInstance_InputStream* instance,
637 int streamid,
638 struct INPUTSTREAM_INFO* info,
639 KODI_HANDLE* demuxStream,
640 KODI_HANDLE (*transfer_stream)(KODI_HANDLE handle,
641 int streamId,
642 struct INPUTSTREAM_INFO* stream));
643 void(__cdecl* enable_stream)(const struct AddonInstance_InputStream* instance,
644 int streamid,
645 bool enable);
646 bool(__cdecl* open_stream)(const struct AddonInstance_InputStream* instance, int streamid);
647 void(__cdecl* demux_reset)(const struct AddonInstance_InputStream* instance);
648 void(__cdecl* demux_abort)(const struct AddonInstance_InputStream* instance);
649 void(__cdecl* demux_flush)(const struct AddonInstance_InputStream* instance);
650 struct DEMUX_PACKET*(__cdecl* demux_read)(const struct AddonInstance_InputStream* instance);
651 bool(__cdecl* demux_seek_time)(const struct AddonInstance_InputStream* instance,
652 double time,
653 bool backwards,
654 double* startpts);
655 void(__cdecl* demux_set_speed)(const struct AddonInstance_InputStream* instance, int speed);
656 void(__cdecl* set_video_resolution)(const struct AddonInstance_InputStream* instance,
657 int width,
658 int height);
659
660 // IDisplayTime
661 int(__cdecl* get_total_time)(const struct AddonInstance_InputStream* instance);
662 int(__cdecl* get_time)(const struct AddonInstance_InputStream* instance);
663
664 // ITime
665 bool(__cdecl* get_times)(const struct AddonInstance_InputStream* instance,
666 struct INPUTSTREAM_TIMES* times);
667
668 // IPosTime
669 bool(__cdecl* pos_time)(const struct AddonInstance_InputStream* instance, int ms);
670
671 int(__cdecl* read_stream)(const struct AddonInstance_InputStream* instance,
672 uint8_t* buffer,
673 unsigned int bufferSize);
674 int64_t(__cdecl* seek_stream)(const struct AddonInstance_InputStream* instance,
675 int64_t position,
676 int whence);
677 int64_t(__cdecl* position_stream)(const struct AddonInstance_InputStream* instance);
678 int64_t(__cdecl* length_stream)(const struct AddonInstance_InputStream* instance);
679 bool(__cdecl* is_real_time_stream)(const struct AddonInstance_InputStream* instance);
680
681 // IChapter
682 int(__cdecl* get_chapter)(const struct AddonInstance_InputStream* instance);
683 int(__cdecl* get_chapter_count)(const struct AddonInstance_InputStream* instance);
684 const char*(__cdecl* get_chapter_name)(const struct AddonInstance_InputStream* instance,
685 int ch);
686 int64_t(__cdecl* get_chapter_pos)(const struct AddonInstance_InputStream* instance, int ch);
687 bool(__cdecl* seek_chapter)(const struct AddonInstance_InputStream* instance, int ch);
688
689 int(__cdecl* block_size_stream)(const struct AddonInstance_InputStream* instance);
690 } KodiToAddonFuncTable_InputStream;
691
692 typedef struct AddonInstance_InputStream /* internal */
693 {
694 struct AddonProps_InputStream* props;
695 struct AddonToKodiFuncTable_InputStream* toKodi;
696 struct KodiToAddonFuncTable_InputStream* toAddon;
697 } AddonInstance_InputStream;
698
699#ifdef __cplusplus
700} /* extern "C" */
701#endif /* __cplusplus */
702
703#endif /* !C_API_ADDONINSTANCE_INPUTSTREAM_H */
diff --git a/xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/inputstream/CMakeLists.txt b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/inputstream/CMakeLists.txt
new file mode 100644
index 0000000..9a22c44
--- /dev/null
+++ b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/inputstream/CMakeLists.txt
@@ -0,0 +1,9 @@
1set(HEADERS demux_packet.h
2 stream_codec.h
3 stream_constants.h
4 stream_crypto.h
5 timing_constants.h)
6
7if(NOT ENABLE_STATIC_LIBS)
8 core_add_library(addons_kodi-dev-kit_include_kodi_c-api_addon-instance_inputstream)
9endif()
diff --git a/xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/inputstream/demux_packet.h b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/inputstream/demux_packet.h
new file mode 100644
index 0000000..79686ab
--- /dev/null
+++ b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/inputstream/demux_packet.h
@@ -0,0 +1,117 @@
1/*
2 * Copyright (C) 2005-2020 Team Kodi
3 * This file is part of Kodi - https://kodi.tv
4 *
5 * SPDX-License-Identifier: GPL-2.0-or-later
6 * See LICENSES/README.md for more information.
7 */
8
9#ifndef C_API_ADDONINSTANCE_INPUTSTREAM_DEMUXPACKET_H
10#define C_API_ADDONINSTANCE_INPUTSTREAM_DEMUXPACKET_H
11
12#include "timing_constants.h"
13
14#include <stdbool.h>
15#include <stdint.h>
16
17#define DEMUX_SPECIALID_STREAMINFO -10
18#define DEMUX_SPECIALID_STREAMCHANGE -11
19
20#ifdef __cplusplus
21extern "C"
22{
23#endif /* __cplusplus */
24
25 struct DEMUX_CRYPTO_INFO;
26
27 //============================================================================
28 /// @defgroup cpp_kodi_addon_inputstream_Defs_Interface_DEMUX_PACKET struct DEMUX_PACKET
29 /// @ingroup cpp_kodi_addon_inputstream_Defs_Interface
30 /// @brief **Demux packet**\n
31 /// To processed codec and demux inputstream stream.
32 ///
33 /// This part is in the "C" style in order to have better performance and
34 /// possibly to be used in "C" libraries.
35 ///
36 /// The structure should be created with @ref kodi::addon::CInstanceInputStream::AllocateDemuxPacket()
37 /// or @ref kodi::addon::CInstanceInputStream::AllocateEncryptedDemuxPacket()
38 /// and if not added to Kodi with @ref kodi::addon::CInstanceInputStream::FreeDemuxPacket()
39 /// be deleted again.
40 ///
41 /// Packages that have been given to Kodi and processed will then be deleted
42 /// by him.
43 ///
44 ///@{
45 struct DEMUX_PACKET
46 {
47 /// @brief Stream package which is given for decoding.
48 ///
49 /// @note Associated storage from here is created using
50 /// @ref kodi::addon::CInstanceInputStream::AllocateDemuxPacket()
51 /// or @ref kodi::addon::CInstanceInputStream::AllocateEncryptedDemuxPacket().
52 uint8_t* pData;
53
54 /// @brief Size of the package given at @ref pData.
55 int iSize;
56
57 /// @brief Identification of the stream.
58 int iStreamId;
59
60 /// @brief Identification of the associated demuxer, this can be identical
61 /// on several streams.
62 int64_t demuxerId;
63
64 /// @brief The group this data belongs to, used to group data from different
65 /// streams together.
66 int iGroupId;
67
68 //------------------------------------------
69
70 /// @brief Additional packet data that can be provided by the container.
71 ///
72 /// Packet can contain several types of side information.
73 ///
74 /// This is usually based on that of ffmpeg, see
75 /// [AVPacketSideData](https://ffmpeg.org/doxygen/trunk/structAVPacketSideData.html).
76 void* pSideData;
77
78 /// @brief Data elements stored at @ref pSideData.
79 int iSideDataElems;
80
81 //------------------------------------------
82
83 /// @brief Presentation time stamp (PTS).
84 double pts;
85
86 /// @brief Decoding time stamp (DTS).
87 double dts;
88
89 /// @brief Duration in @ref STREAM_TIME_BASE if available
90 double duration;
91
92 /// @brief Display time from input stream
93 int dispTime;
94
95 /// @brief To show that this package allows recreating the presentation by
96 /// mistake.
97 bool recoveryPoint;
98
99 //------------------------------------------
100
101 /// @brief Optional data to allow decryption at processing site if
102 /// necessary.
103 ///
104 /// This can be created using @ref kodi::addon::CInstanceInputStream::AllocateEncryptedDemuxPacket(),
105 /// otherwise this is declared as <b>`nullptr`</b>.
106 ///
107 /// See @ref DEMUX_CRYPTO_INFO for their style.
108 struct DEMUX_CRYPTO_INFO* cryptoInfo;
109 };
110 ///@}
111 //----------------------------------------------------------------------------
112
113#ifdef __cplusplus
114} /* extern "C" */
115#endif /* __cplusplus */
116
117#endif /* !C_API_ADDONINSTANCE_INPUTSTREAM_DEMUXPACKET_H */
diff --git a/xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/inputstream/stream_codec.h b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/inputstream/stream_codec.h
new file mode 100644
index 0000000..b489cb9
--- /dev/null
+++ b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/inputstream/stream_codec.h
@@ -0,0 +1,131 @@
1/*
2 * Copyright (C) 2017-2018 Team Kodi
3 * This file is part of Kodi - https://kodi.tv
4 *
5 * SPDX-License-Identifier: GPL-2.0-or-later
6 * See LICENSES/README.md for more information.
7 */
8
9#ifndef C_API_ADDONINSTANCE_INPUTSTREAM_STREAMCODEC_H
10#define C_API_ADDONINSTANCE_INPUTSTREAM_STREAMCODEC_H
11
12#ifdef __cplusplus
13extern "C"
14{
15#endif /* __cplusplus */
16
17 //==============================================================================
18 /// @defgroup cpp_kodi_addon_inputstream_Defs_StreamEncryption_STREAMCODEC_PROFILE enum STREAMCODEC_PROFILE
19 /// @ingroup cpp_kodi_addon_inputstream_Defs_StreamCodec
20 /// @brief **The standard defines several sets of capabilities.**\n
21 /// Which are referred to as profiles, targeting specific classes of applications.
22 ///
23 ///@{
24 enum STREAMCODEC_PROFILE
25 {
26 /// @brief Unknown codec profile
27 CodecProfileUnknown = 0,
28
29 /// @brief If a codec profile is not required
30 CodecProfileNotNeeded,
31
32 /// @brief **H264** Baseline Profile (BP, 66)\n
33 /// \n
34 /// Primarily for low-cost applications that require additional data loss
35 /// robustness, this profile is used in some videoconferencing and mobile
36 /// applications. This profile includes all features that are supported
37 /// in the Constrained Baseline Profile, plus three additional features
38 /// that can be used for loss robustness (or for other purposes such as
39 /// low-delay multi-point video stream compositing). The importance of
40 /// this profile has faded somewhat since the definition of the Constrained
41 /// Baseline Profile in 2009. All Constrained Baseline Profile bitstreams
42 /// are also considered to be Baseline Profile bitstreams, as these two
43 /// profiles share the same profile identifier code value.
44 H264CodecProfileBaseline,
45
46 /// @brief **H264** Main Profile (MP, 77)\n
47 /// \n
48 /// This profile is used for standard-definition digital TV broadcasts that
49 /// use the MPEG-4 format as defined in the
50 /// [DVB standard](http://www.etsi.org/deliver/etsi_ts/101100_101199/101154/01.09.01_60/ts_101154v010901p.pdf).
51 /// It is not, however, used for high-definition television broadcasts, as the
52 /// importance of this profile faded when the High Profile was developed
53 /// in 2004 for that application.
54 H264CodecProfileMain,
55
56 /// @brief **H264** Extended Profile (XP, 88)\n
57 /// \n
58 /// Intended as the streaming video profile, this profile has relatively high
59 /// compression capability and some extra tricks for robustness to data losses
60 /// and server stream switching.
61 H264CodecProfileExtended,
62
63 /// @brief **H264** High Profile (HiP, 100)\n
64 /// \n
65 /// The primary profile for broadcast and disc storage applications,
66 /// particularly for high-definition television applications (for example,
67 /// this is the profile adopted by the [Blu-ray Disc](https://en.wikipedia.org/wiki/Blu-ray_Disc)
68 /// storage format and the [DVB](https://en.wikipedia.org/wiki/Digital_Video_Broadcasting)
69 /// HDTV broadcast service).
70 H264CodecProfileHigh,
71
72 /// @brief **H264** High 10 Profile (Hi10P, 110)\n
73 /// \n
74 /// Going beyond typical mainstream consumer product capabilities, this
75 /// profile builds on top of the High Profile, adding support for up to 10
76 /// bits per sample of decoded picture precision.
77 H264CodecProfileHigh10,
78
79 /// @brief **H264** High 4:2:2 Profile (Hi422P, 122)\n
80 /// \n
81 /// Primarily targeting professional applications that use interlaced video,
82 /// this profile builds on top of the High 10 Profile, adding support for the
83 /// 4:2:2 chroma sampling format while using up to 10 bits per sample of
84 /// decoded picture precision.
85 H264CodecProfileHigh422,
86
87 /// @brief **H264** High 4:4:4 Predictive Profile (Hi444PP, 244)\n
88 /// \n
89 /// This profile builds on top of the High 4:2:2 Profile, supporting up to
90 /// 4:4:4 chroma sampling, up to 14 bits per sample, and additionally
91 /// supporting efficient lossless region coding and the coding of each
92 /// picture as three separate color planes.
93 H264CodecProfileHigh444Predictive,
94
95 /// @brief **VP9** profile 0\n
96 /// \n
97 /// There are several variants of the VP9 format (known as "coding profiles"),
98 /// which successively allow more features; profile 0 is the basic variant,
99 /// requiring the least from a hardware implementation.
100 ///
101 /// [Color depth](https://en.wikipedia.org/wiki/Color_depth): 8 bit/sample,
102 /// [chroma subsampling](https://en.wikipedia.org/wiki/Chroma_subsampling): 4:2:0
103 VP9CodecProfile0 = 20,
104
105 /// @brief **VP9** profile 1\n
106 /// \n
107 /// [Color depth](https://en.wikipedia.org/wiki/Color_depth): 8 bit,
108 /// [chroma subsampling](https://en.wikipedia.org/wiki/Chroma_subsampling): 4:2:0, 4:2:2, 4:4:4
109 VP9CodecProfile1,
110
111 /// @brief **VP9** profile 2\n
112 /// \n
113 /// [Color depth](https://en.wikipedia.org/wiki/Color_depth): 10–12 bit,
114 /// [chroma subsampling](https://en.wikipedia.org/wiki/Chroma_subsampling): 4:2:0
115 VP9CodecProfile2,
116
117 /// @brief **VP9** profile 3\n
118 /// \n
119 /// [Color depth](https://en.wikipedia.org/wiki/Color_depth): 10–12 bit,
120 /// [chroma subsampling](https://en.wikipedia.org/wiki/Chroma_subsampling): 4:2:0, 4:2:2, 4:4:4,
121 /// see [VP9 Bitstream & Decoding Process Specification](https://storage.googleapis.com/downloads.webmproject.org/docs/vp9/vp9-bitstream-specification-v0.6-20160331-draft.pdf)
122 VP9CodecProfile3,
123 };
124 ///@}
125 //------------------------------------------------------------------------------
126
127#ifdef __cplusplus
128} /* extern "C" */
129#endif /* __cplusplus */
130
131#endif /* !C_API_ADDONINSTANCE_INPUTSTREAM_STREAMCODEC_H */
diff --git a/xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/inputstream/stream_constants.h b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/inputstream/stream_constants.h
new file mode 100644
index 0000000..f442d64
--- /dev/null
+++ b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/inputstream/stream_constants.h
@@ -0,0 +1,49 @@
1/*
2 * Copyright (C) 2017-2020 Team Kodi
3 * This file is part of Kodi - https://kodi.tv
4 *
5 * SPDX-License-Identifier: GPL-2.0-or-later
6 * See LICENSES/README.md for more information.
7 */
8
9#ifndef C_API_ADDONINSTANCE_INPUTSTREAM_STREAMCONSTANTS_H
10#define C_API_ADDONINSTANCE_INPUTSTREAM_STREAMCONSTANTS_H
11
12/// @ingroup cpp_kodi_addon_inputstream_Defs_StreamConstants
13/// @brief The name of the inputstream add-on that should be used by Kodi to
14/// play the stream.
15///
16/// Leave blank to use Kodi's built-in playing capabilities or to allow
17/// ffmpeg to handle directly set to @ref STREAM_PROPERTY_VALUE_INPUTSTREAMFFMPEG.
18#define STREAM_PROPERTY_INPUTSTREAM "inputstream"
19
20/// @ingroup cpp_kodi_addon_inputstream_Defs_StreamConstants
21/// @brief Identification string for an input stream.
22///
23/// This value can be used in addition to @ref STREAM_PROPERTY_INPUTSTREAM. It is
24/// used to provide the respective inpustream addon with additional
25/// identification.
26///
27/// The difference between this and other stream properties is that it is also
28/// passed in the associated @ref kodi::addon::CAddonBase::CreateInstance call.
29///
30/// This makes it possible to select different processing classes within the
31/// associated add-on.
32#define STREAM_PROPERTY_INPUTSTREAM_INSTANCE_ID "inputstream-instance-id"
33
34/// @ingroup cpp_kodi_addon_inputstream_Defs_StreamConstants
35/// @brief "true" to denote that the stream that should be played is a
36/// realtime stream. Any other value indicates that this is not a realtime
37/// stream.
38#define STREAM_PROPERTY_ISREALTIMESTREAM "isrealtimestream"
39
40/// @ingroup cpp_kodi_addon_inputstream_Defs_StreamConstants
41/// @brief Special value for @ref STREAM_PROPERTY_INPUTSTREAM to use
42/// ffmpeg to directly play a stream URL.
43#define STREAM_PROPERTY_VALUE_INPUTSTREAMFFMPEG "inputstream.ffmpeg"
44
45/// @ingroup cpp_kodi_addon_inputstream_Defs_StreamConstants
46/// @brief Max number of properties that can be sent to an Inputstream addon
47#define STREAM_MAX_PROPERTY_COUNT 30
48
49#endif /* !C_API_ADDONINSTANCE_INPUTSTREAM_STREAMCONSTANTS_H */
diff --git a/xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/inputstream/stream_crypto.h b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/inputstream/stream_crypto.h
new file mode 100644
index 0000000..4b60306
--- /dev/null
+++ b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/inputstream/stream_crypto.h
@@ -0,0 +1,129 @@
1/*
2 * Copyright (C) 2017-2018 Team Kodi
3 * This file is part of Kodi - https://kodi.tv
4 *
5 * SPDX-License-Identifier: GPL-2.0-or-later
6 * See LICENSES/README.md for more information.
7 */
8
9#ifndef C_API_ADDONINSTANCE_INPUTSTREAM_STREAMCRYPTO_H
10#define C_API_ADDONINSTANCE_INPUTSTREAM_STREAMCRYPTO_H
11
12#include <stdint.h>
13#include <string.h>
14
15#define STREAMCRYPTO_VERSION_LEVEL 2
16
17#ifdef __cplusplus
18extern "C"
19{
20#endif /* __cplusplus */
21
22 //============================================================================
23 /// @defgroup cpp_kodi_addon_inputstream_Defs_StreamEncryption_STREAM_CRYPTO_KEY_SYSTEM enum STREAM_CRYPTO_KEY_SYSTEM
24 /// @ingroup cpp_kodi_addon_inputstream_Defs_StreamEncryption
25 /// @brief **Available ways to process stream cryptography**\n
26 /// For @ref cpp_kodi_addon_inputstream_Defs_StreamEncryption_StreamCryptoSession,
27 /// this defines the used and required auxiliary modules which are required to
28 /// process the encryption stream.
29 ///
30 /// Used to set wanted [digital rights management](https://en.wikipedia.org/wiki/Digital_rights_management)
31 /// (DRM) technology provider for stream.
32 ///@{
33 enum STREAM_CRYPTO_KEY_SYSTEM
34 {
35 /// @brief **0** - If no path is to be used, this is the default
36 STREAM_CRYPTO_KEY_SYSTEM_NONE = 0,
37
38 /// @brief **1** - To use [Widevine](https://en.wikipedia.org/wiki/Widevine) for processing
39 STREAM_CRYPTO_KEY_SYSTEM_WIDEVINE,
40
41 /// @brief **2** - To use [Playready](https://en.wikipedia.org/wiki/PlayReady) for processing
42 STREAM_CRYPTO_KEY_SYSTEM_PLAYREADY,
43
44 /// @brief **3** - To use Wiseplay for processing
45 STREAM_CRYPTO_KEY_SYSTEM_WISEPLAY,
46
47 /// @brief **4** - The maximum value to use in a list.
48 STREAM_CRYPTO_KEY_SYSTEM_COUNT
49 };
50 ///@}
51 //----------------------------------------------------------------------------
52
53 //============================================================================
54 /// @defgroup cpp_kodi_addon_inputstream_Defs_StreamEncryption_STREAM_CRYPTO_FLAGS enum STREAM_CRYPTO_FLAGS
55 /// @ingroup cpp_kodi_addon_inputstream_Defs_StreamEncryption
56 /// @brief **Cryptography flags to use special conditions**\n
57 /// To identify special extra conditions.
58 ///
59 /// @note These variables are bit flags which are created using "|" can be used
60 /// together.
61 ///
62 ///@{
63 enum STREAM_CRYPTO_FLAGS
64 {
65 /// @brief **0000 0000** - Empty to set if nothing is used.
66 STREAM_CRYPTO_FLAG_NONE = 0,
67
68 /// @brief **0000 0001** - Is set in flags if decoding has to be done in
69 /// [trusted execution environment (TEE)](https://en.wikipedia.org/wiki/Trusted_execution_environment).
70 STREAM_CRYPTO_FLAG_SECURE_DECODER = (1 << 0)
71 };
72 ///@}
73 //----------------------------------------------------------------------------
74
75 //============================================================================
76 /// @defgroup cpp_kodi_addon_inputstream_Defs_StreamEncryption_DEMUX_CRYPTO_INFO struct DEMUX_CRYPTO_INFO
77 /// @ingroup cpp_kodi_addon_inputstream_Defs_StreamEncryption
78 /// @brief **C data structure for processing encrypted streams.**\n
79 /// If required, this structure is used for every DEMUX_PACKET to be processed.
80 ///
81 ///@{
82 struct DEMUX_CRYPTO_INFO
83 {
84 /// @brief Number of subsamples.
85 uint16_t numSubSamples;
86
87 /// @brief Flags for later use.
88 uint16_t flags;
89
90 /// @brief @ref numSubSamples uint16_t's wich define the size of clear size
91 /// of a subsample.
92 uint16_t* clearBytes;
93
94 /// @brief @ref numSubSamples uint32_t's wich define the size of cipher size
95 /// of a subsample.
96 uint32_t* cipherBytes;
97
98 /// @brief Initialization vector
99 uint8_t iv[16];
100
101 /// @brief Key id
102 uint8_t kid[16];
103 };
104 ///@}
105 //----------------------------------------------------------------------------
106
107 // Data to manage stream cryptography
108 struct STREAM_CRYPTO_SESSION
109 {
110 // keysystem for encrypted media, STREAM_CRYPTO_KEY_SYSTEM_NONE for unencrypted
111 // media.
112 //
113 // See STREAM_CRYPTO_KEY_SYSTEM for available options.
114 enum STREAM_CRYPTO_KEY_SYSTEM keySystem;
115
116 // Flags to use special conditions, see STREAM_CRYPTO_FLAGS for available flags.
117 uint8_t flags;
118
119 // The crypto session key id.
120 char sessionId[256];
121 };
122 ///@}
123 //----------------------------------------------------------------------------
124
125#ifdef __cplusplus
126} /* extern "C" */
127#endif /* __cplusplus */
128
129#endif /* !C_API_ADDONINSTANCE_INPUTSTREAM_STREAMCRYPTO_H */
diff --git a/xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/inputstream/timing_constants.h b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/inputstream/timing_constants.h
new file mode 100644
index 0000000..a226a0d
--- /dev/null
+++ b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/inputstream/timing_constants.h
@@ -0,0 +1,42 @@
1/*
2 * Copyright (C) 2015-2020 Team Kodi
3 * This file is part of Kodi - https://kodi.tv
4 *
5 * SPDX-License-Identifier: GPL-2.0-or-later
6 * See LICENSES/README.md for more information.
7 */
8
9#ifndef C_API_ADDONINSTANCE_INPUTSTREAM_TIMINGCONSTANTS_H
10#define C_API_ADDONINSTANCE_INPUTSTREAM_TIMINGCONSTANTS_H
11
12/// @ingroup cpp_kodi_addon_inputstream_Defs_TimingConstants
13/// @brief Speed value to pause stream in playback.
14///
15#define STREAM_PLAYSPEED_PAUSE 0 // frame stepping
16
17/// @ingroup cpp_kodi_addon_inputstream_Defs_TimingConstants
18/// @brief Speed value to perform stream playback at normal speed.
19///
20/// See @ref STREAM_PLAYSPEED_PAUSE for pause of stream.
21///
22#define STREAM_PLAYSPEED_NORMAL 1000
23
24/// @ingroup cpp_kodi_addon_inputstream_Defs_TimingConstants
25/// @brief Time base represented as integer.
26///
27#define STREAM_TIME_BASE 1000000
28
29/// @ingroup cpp_kodi_addon_inputstream_Defs_TimingConstants
30/// @brief Undefined timestamp value.
31///
32/// Usually reported by demuxer that work on containers that do not provide
33/// either pts or dts.
34///
35#define STREAM_NOPTS_VALUE 0xFFF0000000000000
36
37// "C" defines to translate stream times
38#define STREAM_TIME_TO_MSEC(x) ((int)((double)(x)*1000 / STREAM_TIME_BASE))
39#define STREAM_SEC_TO_TIME(x) ((double)(x)*STREAM_TIME_BASE)
40#define STREAM_MSEC_TO_TIME(x) ((double)(x)*STREAM_TIME_BASE / 1000)
41
42#endif /* !C_API_ADDONINSTANCE_INPUTSTREAM_TIMINGCONSTANTS_H */
diff --git a/xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/peripheral.h b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/peripheral.h
index 393f34a..df168bc 100644
--- a/xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/peripheral.h
+++ b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/peripheral.h
@@ -6,8 +6,6 @@
6 * See LICENSES/README.md for more information. 6 * See LICENSES/README.md for more information.
7 */ 7 */
8 8
9#pragma once
10
11#ifndef C_API_ADDONINSTANCE_PERIPHERAL_H 9#ifndef C_API_ADDONINSTANCE_PERIPHERAL_H
12#define C_API_ADDONINSTANCE_PERIPHERAL_H 10#define C_API_ADDONINSTANCE_PERIPHERAL_H
13 11
diff --git a/xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/pvr.h b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/pvr.h
index a50ea2b..cc24e5d 100644
--- a/xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/pvr.h
+++ b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/pvr.h
@@ -6,8 +6,6 @@
6 * See LICENSES/README.md for more information. 6 * See LICENSES/README.md for more information.
7 */ 7 */
8 8
9#pragma once
10
11#ifndef C_API_ADDONINSTANCE_PVR_H 9#ifndef C_API_ADDONINSTANCE_PVR_H
12#define C_API_ADDONINSTANCE_PVR_H 10#define C_API_ADDONINSTANCE_PVR_H
13 11
@@ -67,7 +65,8 @@ extern "C"
67 { 65 {
68 const char* strUserPath; 66 const char* strUserPath;
69 const char* strClientPath; 67 const char* strClientPath;
70 int iEpgMaxDays; 68 int iEpgMaxFutureDays;
69 int iEpgMaxPastDays;
71 } AddonProperties_PVR; 70 } AddonProperties_PVR;
72 71
73 /*! 72 /*!
@@ -124,8 +123,8 @@ extern "C"
124 123
125 //--==----==----==----==----==----==----==----==----==----==----==----==----== 124 //--==----==----==----==----==----==----==----==----==----==----==----==----==
126 // Stream demux interface functions 125 // Stream demux interface functions
127 void (*FreeDemuxPacket)(void* kodiInstance, struct DemuxPacket* pPacket); 126 void (*FreeDemuxPacket)(void* kodiInstance, struct DEMUX_PACKET* pPacket);
128 struct DemuxPacket* (*AllocateDemuxPacket)(void* kodiInstance, int iDataSize); 127 struct DEMUX_PACKET* (*AllocateDemuxPacket)(void* kodiInstance, int iDataSize);
129 struct PVR_CODEC (*GetCodecByName)(const void* kodiInstance, const char* strCodecName); 128 struct PVR_CODEC (*GetCodecByName)(const void* kodiInstance, const char* strCodecName);
130 129
131 //--==----==----==----==----==----==----==----==----==----==----==----==----== 130 //--==----==----==----==----==----==----==----==----==----==----==----==----==
@@ -210,7 +209,8 @@ extern "C"
210 const struct EPG_TAG*, 209 const struct EPG_TAG*,
211 struct PVR_NAMED_VALUE*, 210 struct PVR_NAMED_VALUE*,
212 unsigned int*); 211 unsigned int*);
213 enum PVR_ERROR(__cdecl* SetEPGTimeFrame)(const struct AddonInstance_PVR*, int); 212 enum PVR_ERROR(__cdecl* SetEPGMaxPastDays)(const struct AddonInstance_PVR*, int);
213 enum PVR_ERROR(__cdecl* SetEPGMaxFutureDays)(const struct AddonInstance_PVR*, int);
214 enum PVR_ERROR(__cdecl* CallEPGMenuHook)(const struct AddonInstance_PVR*, 214 enum PVR_ERROR(__cdecl* CallEPGMenuHook)(const struct AddonInstance_PVR*,
215 const struct PVR_MENUHOOK*, 215 const struct PVR_MENUHOOK*,
216 const struct EPG_TAG*); 216 const struct EPG_TAG*);
@@ -295,7 +295,7 @@ extern "C"
295 // Stream demux interface functions 295 // Stream demux interface functions
296 enum PVR_ERROR(__cdecl* GetStreamProperties)(const struct AddonInstance_PVR*, 296 enum PVR_ERROR(__cdecl* GetStreamProperties)(const struct AddonInstance_PVR*,
297 struct PVR_STREAM_PROPERTIES*); 297 struct PVR_STREAM_PROPERTIES*);
298 struct DemuxPacket*(__cdecl* DemuxRead)(const struct AddonInstance_PVR*); 298 struct DEMUX_PACKET*(__cdecl* DemuxRead)(const struct AddonInstance_PVR*);
299 void(__cdecl* DemuxReset)(const struct AddonInstance_PVR*); 299 void(__cdecl* DemuxReset)(const struct AddonInstance_PVR*);
300 void(__cdecl* DemuxAbort)(const struct AddonInstance_PVR*); 300 void(__cdecl* DemuxAbort)(const struct AddonInstance_PVR*);
301 void(__cdecl* DemuxFlush)(const struct AddonInstance_PVR*); 301 void(__cdecl* DemuxFlush)(const struct AddonInstance_PVR*);
diff --git a/xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/pvr/pvr_channel_groups.h b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/pvr/pvr_channel_groups.h
index a24d27f..f8213fb 100644
--- a/xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/pvr/pvr_channel_groups.h
+++ b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/pvr/pvr_channel_groups.h
@@ -6,8 +6,6 @@
6 * See LICENSES/README.md for more information. 6 * See LICENSES/README.md for more information.
7 */ 7 */
8 8
9#pragma once
10
11#ifndef C_API_ADDONINSTANCE_PVR_CHANNEL_GROUPS_H 9#ifndef C_API_ADDONINSTANCE_PVR_CHANNEL_GROUPS_H
12#define C_API_ADDONINSTANCE_PVR_CHANNEL_GROUPS_H 10#define C_API_ADDONINSTANCE_PVR_CHANNEL_GROUPS_H
13 11
diff --git a/xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/pvr/pvr_channels.h b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/pvr/pvr_channels.h
index 00daffa..a19fba1 100644
--- a/xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/pvr/pvr_channels.h
+++ b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/pvr/pvr_channels.h
@@ -6,8 +6,6 @@
6 * See LICENSES/README.md for more information. 6 * See LICENSES/README.md for more information.
7 */ 7 */
8 8
9#pragma once
10
11#ifndef C_API_ADDONINSTANCE_PVR_CHANNELS_H 9#ifndef C_API_ADDONINSTANCE_PVR_CHANNELS_H
12#define C_API_ADDONINSTANCE_PVR_CHANNELS_H 10#define C_API_ADDONINSTANCE_PVR_CHANNELS_H
13 11
diff --git a/xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/pvr/pvr_defines.h b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/pvr/pvr_defines.h
index 449000f..a765121 100644
--- a/xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/pvr/pvr_defines.h
+++ b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/pvr/pvr_defines.h
@@ -6,8 +6,6 @@
6 * See LICENSES/README.md for more information. 6 * See LICENSES/README.md for more information.
7 */ 7 */
8 8
9#pragma once
10
11#ifndef C_API_ADDONINSTANCE_PVR_DEFINES_H 9#ifndef C_API_ADDONINSTANCE_PVR_DEFINES_H
12#define C_API_ADDONINSTANCE_PVR_DEFINES_H 10#define C_API_ADDONINSTANCE_PVR_DEFINES_H
13 11
diff --git a/xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/pvr/pvr_edl.h b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/pvr/pvr_edl.h
index e7cdf06..c74a113 100644
--- a/xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/pvr/pvr_edl.h
+++ b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/pvr/pvr_edl.h
@@ -6,8 +6,6 @@
6 * See LICENSES/README.md for more information. 6 * See LICENSES/README.md for more information.
7 */ 7 */
8 8
9#pragma once
10
11#ifndef C_API_ADDONINSTANCE_PVR_EDL_H 9#ifndef C_API_ADDONINSTANCE_PVR_EDL_H
12#define C_API_ADDONINSTANCE_PVR_EDL_H 10#define C_API_ADDONINSTANCE_PVR_EDL_H
13 11
diff --git a/xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/pvr/pvr_epg.h b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/pvr/pvr_epg.h
index d7512dc..2ed23cd 100644
--- a/xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/pvr/pvr_epg.h
+++ b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/pvr/pvr_epg.h
@@ -6,8 +6,6 @@
6 * See LICENSES/README.md for more information. 6 * See LICENSES/README.md for more information.
7 */ 7 */
8 8
9#pragma once
10
11#ifndef C_API_ADDONINSTANCE_PVR_EPG_H 9#ifndef C_API_ADDONINSTANCE_PVR_EPG_H
12#define C_API_ADDONINSTANCE_PVR_EPG_H 10#define C_API_ADDONINSTANCE_PVR_EPG_H
13 11
diff --git a/xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/pvr/pvr_general.h b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/pvr/pvr_general.h
index e2136f6..b4470bb 100644
--- a/xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/pvr/pvr_general.h
+++ b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/pvr/pvr_general.h
@@ -6,19 +6,12 @@
6 * See LICENSES/README.md for more information. 6 * See LICENSES/README.md for more information.
7 */ 7 */
8 8
9#pragma once
10
11#ifndef C_API_ADDONINSTANCE_PVR_GENERAL_H 9#ifndef C_API_ADDONINSTANCE_PVR_GENERAL_H
12#define C_API_ADDONINSTANCE_PVR_GENERAL_H 10#define C_API_ADDONINSTANCE_PVR_GENERAL_H
13 11
12#include "../inputstream/stream_constants.h"
14#include "pvr_defines.h" 13#include "pvr_defines.h"
15 14
16#ifdef BUILD_KODI_ADDON
17#include "../../../InputStreamConstants.h"
18#else
19#include "cores/VideoPlayer/Interface/Addon/InputStreamConstants.h"
20#endif
21
22#include <stdbool.h> 15#include <stdbool.h>
23 16
24//¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ 17//¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
diff --git a/xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/pvr/pvr_menu_hook.h b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/pvr/pvr_menu_hook.h
index 2ead263..e204311 100644
--- a/xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/pvr/pvr_menu_hook.h
+++ b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/pvr/pvr_menu_hook.h
@@ -6,8 +6,6 @@
6 * See LICENSES/README.md for more information. 6 * See LICENSES/README.md for more information.
7 */ 7 */
8 8
9#pragma once
10
11#ifndef C_API_ADDONINSTANCE_PVR_MENUHOOK_H 9#ifndef C_API_ADDONINSTANCE_PVR_MENUHOOK_H
12#define C_API_ADDONINSTANCE_PVR_MENUHOOK_H 10#define C_API_ADDONINSTANCE_PVR_MENUHOOK_H
13 11
diff --git a/xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/pvr/pvr_recordings.h b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/pvr/pvr_recordings.h
index 2e2c081..0bbfe57 100644
--- a/xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/pvr/pvr_recordings.h
+++ b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/pvr/pvr_recordings.h
@@ -6,8 +6,6 @@
6 * See LICENSES/README.md for more information. 6 * See LICENSES/README.md for more information.
7 */ 7 */
8 8
9#pragma once
10
11#ifndef C_API_ADDONINSTANCE_PVR_RECORDINGS_H 9#ifndef C_API_ADDONINSTANCE_PVR_RECORDINGS_H
12#define C_API_ADDONINSTANCE_PVR_RECORDINGS_H 10#define C_API_ADDONINSTANCE_PVR_RECORDINGS_H
13 11
diff --git a/xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/pvr/pvr_stream.h b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/pvr/pvr_stream.h
index 1206c67..aaca30e 100644
--- a/xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/pvr/pvr_stream.h
+++ b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/pvr/pvr_stream.h
@@ -6,19 +6,12 @@
6 * See LICENSES/README.md for more information. 6 * See LICENSES/README.md for more information.
7 */ 7 */
8 8
9#pragma once
10
11#ifndef C_API_ADDONINSTANCE_PVR_STREAM_H 9#ifndef C_API_ADDONINSTANCE_PVR_STREAM_H
12#define C_API_ADDONINSTANCE_PVR_STREAM_H 10#define C_API_ADDONINSTANCE_PVR_STREAM_H
13 11
12#include "../inputstream/demux_packet.h"
14#include "pvr_defines.h" 13#include "pvr_defines.h"
15 14
16#ifdef BUILD_KODI_ADDON
17#include "../../../DemuxPacket.h"
18#else
19#include "cores/VideoPlayer/Interface/Addon/DemuxPacket.h"
20#endif
21
22#include <stdint.h> 15#include <stdint.h>
23#include <time.h> 16#include <time.h>
24 17
diff --git a/xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/pvr/pvr_timers.h b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/pvr/pvr_timers.h
index 209726d..a4b53d6 100644
--- a/xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/pvr/pvr_timers.h
+++ b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/pvr/pvr_timers.h
@@ -6,8 +6,6 @@
6 * See LICENSES/README.md for more information. 6 * See LICENSES/README.md for more information.
7 */ 7 */
8 8
9#pragma once
10
11#ifndef C_API_ADDONINSTANCE_PVR_TIMERS_H 9#ifndef C_API_ADDONINSTANCE_PVR_TIMERS_H
12#define C_API_ADDONINSTANCE_PVR_TIMERS_H 10#define C_API_ADDONINSTANCE_PVR_TIMERS_H
13 11
diff --git a/xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/screensaver.h b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/screensaver.h
index 32cf6e1..90f971a 100644
--- a/xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/screensaver.h
+++ b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/screensaver.h
@@ -6,7 +6,8 @@
6 * See LICENSES/README.md for more information. 6 * See LICENSES/README.md for more information.
7 */ 7 */
8 8
9#pragma once 9#ifndef C_API_ADDONINSTANCE_SCREENSAVER_H
10#define C_API_ADDONINSTANCE_SCREENSAVER_H
10 11
11#include "../addon_base.h" 12#include "../addon_base.h"
12 13
@@ -73,3 +74,5 @@ extern "C"
73#ifdef __cplusplus 74#ifdef __cplusplus
74} /* extern "C" */ 75} /* extern "C" */
75#endif /* __cplusplus */ 76#endif /* __cplusplus */
77
78#endif /* !C_API_ADDONINSTANCE_SCREENSAVER_H */
diff --git a/xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/vfs.h b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/vfs.h
index a6c3f44..7021c0f 100644
--- a/xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/vfs.h
+++ b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/vfs.h
@@ -5,8 +5,6 @@
5 * See LICENSES/README.md for more information. 5 * See LICENSES/README.md for more information.
6 */ 6 */
7 7
8#pragma once
9
10#ifndef C_API_ADDONINSTANCE_VFS_H 8#ifndef C_API_ADDONINSTANCE_VFS_H
11#define C_API_ADDONINSTANCE_VFS_H 9#define C_API_ADDONINSTANCE_VFS_H
12 10
@@ -94,7 +92,7 @@ extern "C"
94 VFS_FILE_HANDLE context); 92 VFS_FILE_HANDLE context);
95 bool(__cdecl* io_control_get_cache_status)(const struct AddonInstance_VFSEntry* instance, 93 bool(__cdecl* io_control_get_cache_status)(const struct AddonInstance_VFSEntry* instance,
96 VFS_FILE_HANDLE context, 94 VFS_FILE_HANDLE context,
97 VFS_CACHE_STATUS_DATA* status); 95 struct VFS_CACHE_STATUS_DATA* status);
98 bool(__cdecl* io_control_set_cache_rate)(const struct AddonInstance_VFSEntry* instance, 96 bool(__cdecl* io_control_set_cache_rate)(const struct AddonInstance_VFSEntry* instance,
99 VFS_FILE_HANDLE context, 97 VFS_FILE_HANDLE context,
100 unsigned int rate); 98 unsigned int rate);
diff --git a/xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/video_codec.h b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/video_codec.h
new file mode 100644
index 0000000..02d8b06
--- /dev/null
+++ b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/video_codec.h
@@ -0,0 +1,261 @@
1/*
2 * Copyright (C) 2017-2018 Team Kodi
3 * This file is part of Kodi - https://kodi.tv
4 *
5 * SPDX-License-Identifier: GPL-2.0-or-later
6 * See LICENSES/README.md for more information.
7 */
8
9#ifndef C_API_ADDONINSTANCE_VIDEOCODEC_H
10#define C_API_ADDONINSTANCE_VIDEOCODEC_H
11
12#include "../addon_base.h"
13#include "inputstream/demux_packet.h"
14#include "inputstream/stream_codec.h"
15#include "inputstream/stream_crypto.h"
16
17#ifdef __cplusplus
18extern "C"
19{
20#endif /* __cplusplus */
21
22 //============================================================================
23 /// @ingroup cpp_kodi_addon_videocodec_Defs
24 /// @brief Return values used by video decoder interface
25 enum VIDEOCODEC_RETVAL
26 {
27 /// @brief Noop
28 VC_NONE = 0,
29
30 /// @brief An error occured, no other messages will be returned
31 VC_ERROR,
32
33 /// @brief The decoder needs more data
34 VC_BUFFER,
35
36 /// @brief The decoder got a picture
37 VC_PICTURE,
38
39 /// @brief The decoder signals EOF
40 VC_EOF,
41 };
42 //----------------------------------------------------------------------------
43
44 //============================================================================
45 /// @ingroup cpp_kodi_addon_videocodec_Defs_VideoCodecInitdata
46 /// @brief The video stream representations requested by Kodi
47 ///
48 enum VIDEOCODEC_FORMAT
49 {
50 /// @brief Unknown types, this is used to declare the end of a list of
51 /// requested types
52 VIDEOCODEC_FORMAT_UNKNOWN = 0,
53
54 /// @brief YV12 4:2:0 YCrCb planar format
55 VIDEOCODEC_FORMAT_YV12,
56
57 /// @brief These formats are identical to YV12 except that the U and V plane
58 /// order is reversed.
59 VIDEOCODEC_FORMAT_I420,
60
61 /// @brief The maximum value to use in a list.
62 VIDEOCODEC_FORMAT_MAXFORMATS
63 };
64 //----------------------------------------------------------------------------
65
66 //============================================================================
67 /// @ingroup cpp_kodi_addon_videocodec_Defs_VideoCodecInitdata
68 /// @brief Video codec types that can be requested from Kodi
69 ///
70 enum VIDEOCODEC_TYPE
71 {
72 /// @brief Unknown or other type requested
73 ///
74 VIDEOCODEC_UNKNOWN = 0,
75
76 /// @brief [VP8](https://en.wikipedia.org/wiki/VP8) video coding format
77 ///
78 VIDEOCODEC_VP8,
79
80 /// @brief [Advanced Video Coding (AVC)](https://en.wikipedia.org/wiki/Advanced_Video_Coding),
81 /// also referred to as H.264 or [MPEG-4](https://en.wikipedia.org/wiki/MPEG-4)
82 /// Part 10, Advanced Video Coding (MPEG-4 AVC).
83 VIDEOCODEC_H264,
84
85 /// @brief [VP9](https://en.wikipedia.org/wiki/VP9) video coding format\n
86 /// \n
87 /// VP9 is the successor to VP8 and competes mainly with MPEG's
88 /// [High Efficiency Video Coding](https://en.wikipedia.org/wiki/High_Efficiency_Video_Coding)
89 /// (HEVC/H.265).
90 VIDEOCODEC_VP9
91 };
92 //----------------------------------------------------------------------------
93
94 //============================================================================
95 /// @ingroup cpp_kodi_addon_videocodec_Defs_VIDEOCODEC_PICTURE
96 /// @brief YUV Plane identification pointers
97 ///
98 /// YUV is a color encoding system typically used as part of a color image pipeline.
99 ///
100 /// These are used to access stored data in @ref VIDEOCODEC_PICTURE::planeOffsets
101 /// and @ref VIDEOCODEC_PICTURE::stride.
102 ///
103 enum VIDEOCODEC_PLANE
104 {
105 /// @brief "luminance" component Y (equivalent to grey scale)
106 VIDEOCODEC_PICTURE_Y_PLANE = 0,
107
108 /// @brief "chrominance" component U (blue projection)
109 VIDEOCODEC_PICTURE_U_PLANE,
110
111 /// @brief "chrominance" component V (red projection)
112 VIDEOCODEC_PICTURE_V_PLANE,
113
114 /// @brief The maximum value to use in a list.
115 VIDEOCODEC_PICTURE_MAXPLANES = 3,
116 };
117 //----------------------------------------------------------------------------
118
119 //============================================================================
120 /// @ingroup cpp_kodi_addon_videocodec_Defs_VIDEOCODEC_PICTURE
121 /// @brief Video coded process flags, used to perform special operations in
122 /// stream calls.
123 ///
124 /// These are used to access stored data in @ref VIDEOCODEC_PICTURE::flags.
125 ///
126 /// @note These variables are bit flags which are created using "|" can be used together.
127 ///
128 enum VIDEOCODEC_PICTURE_FLAG
129 {
130 /// @brief Empty and nothing defined
131 VIDEOCODEC_PICTURE_FLAG_NONE = 0,
132
133 /// @brief Drop in decoder
134 VIDEOCODEC_PICTURE_FLAG_DROP = (1 << 0),
135
136 /// @brief Squeeze out pictured without feeding new packets
137 VIDEOCODEC_PICTURE_FLAG_DRAIN = (1 << 1),
138 };
139 //----------------------------------------------------------------------------
140
141 //============================================================================
142 /// @defgroup cpp_kodi_addon_videocodec_Defs_VIDEOCODEC_PICTURE struct VIDEOCODEC_PICTURE
143 /// @ingroup cpp_kodi_addon_videocodec_Defs
144 /// @brief Data structure which is given to the addon when a decoding call is made.
145 ///
146 ///@{
147 struct VIDEOCODEC_PICTURE
148 {
149 /// @brief The video format declared with @ref VIDEOCODEC_FORMAT and to be
150 /// used on the addon.
151 enum VIDEOCODEC_FORMAT videoFormat;
152
153 /// @brief Video coded process flags, used to perform special operations in
154 /// stream calls.
155 ///
156 /// Possible flags are declared here @ref VIDEOCODEC_PICTURE_FLAGS.
157 uint32_t flags;
158
159 /// @brief Picture width.
160 uint32_t width;
161
162 /// @brief Picture height.
163 uint32_t height;
164
165 /// @brief Data to be decoded in the addon.
166 uint8_t* decodedData;
167
168 /// @brief Size of the data given with @ref decodedData
169 size_t decodedDataSize;
170
171 /// @brief YUV color plane calculation array.
172 ///
173 /// This includes the three values of the YUV and can be identified using
174 /// @ref VIDEOCODEC_PLANE.
175 uint32_t planeOffsets[VIDEOCODEC_PICTURE_MAXPLANES];
176
177 /// @brief YUV color stride calculation array
178 ///
179 /// This includes the three values of the YUV and can be identified using
180 /// @ref VIDEOCODEC_PLANE.
181 uint32_t stride[VIDEOCODEC_PICTURE_MAXPLANES];
182
183 /// @brief Picture presentation time stamp (PTS).
184 int64_t pts;
185
186 /// @brief This is used to save the related handle from Kodi.
187 ///
188 /// To handle the input stream buffer, this is given by Kodi using
189 /// @ref kodi::addon::CInstanceVideoCodec::GetFrameBuffer and must be
190 /// released again using @ref kodi::addon::CInstanceVideoCodec::ReleaseFrameBuffer.
191 KODI_HANDLE videoBufferHandle;
192 };
193 ///@}
194 //----------------------------------------------------------------------------
195
196 struct VIDEOCODEC_INITDATA
197 {
198 enum VIDEOCODEC_TYPE codec;
199 enum STREAMCODEC_PROFILE codecProfile;
200 enum VIDEOCODEC_FORMAT* videoFormats;
201 uint32_t width;
202 uint32_t height;
203 const uint8_t* extraData;
204 unsigned int extraDataSize;
205 struct STREAM_CRYPTO_SESSION cryptoSession;
206 };
207
208 // this are properties given to the addon on create
209 // at this time we have no parameters for the addon
210 typedef struct AddonProps_VideoCodec
211 {
212 int dummy;
213 } AddonProps_VideoCodec;
214
215 struct AddonInstance_VideoCodec;
216 typedef struct KodiToAddonFuncTable_VideoCodec
217 {
218 KODI_HANDLE addonInstance;
219
220 //! @brief Opens a codec
221 bool(__cdecl* open)(const struct AddonInstance_VideoCodec* instance,
222 struct VIDEOCODEC_INITDATA* initData);
223
224 //! @brief Reconfigures a codec
225 bool(__cdecl* reconfigure)(const struct AddonInstance_VideoCodec* instance,
226 struct VIDEOCODEC_INITDATA* initData);
227
228 //! @brief Feed codec if requested from GetPicture() (return VC_BUFFER)
229 bool(__cdecl* add_data)(const struct AddonInstance_VideoCodec* instance,
230 const struct DEMUX_PACKET* packet);
231
232 //! @brief Get a decoded picture / request new data
233 enum VIDEOCODEC_RETVAL(__cdecl* get_picture)(const struct AddonInstance_VideoCodec* instance,
234 struct VIDEOCODEC_PICTURE* picture);
235
236 //! @brief Get the name of this video decoder
237 const char*(__cdecl* get_name)(const struct AddonInstance_VideoCodec* instance);
238
239 //! @brief Reset the codec
240 void(__cdecl* reset)(const struct AddonInstance_VideoCodec* instance);
241 } KodiToAddonFuncTable_VideoCodec;
242
243 typedef struct AddonToKodiFuncTable_VideoCodec
244 {
245 KODI_HANDLE kodiInstance;
246 bool (*get_frame_buffer)(void* kodiInstance, struct VIDEOCODEC_PICTURE* picture);
247 void (*release_frame_buffer)(void* kodiInstance, void* buffer);
248 } AddonToKodiFuncTable_VideoCodec;
249
250 typedef struct AddonInstance_VideoCodec
251 {
252 struct AddonProps_VideoCodec* props;
253 struct AddonToKodiFuncTable_VideoCodec* toKodi;
254 struct KodiToAddonFuncTable_VideoCodec* toAddon;
255 } AddonInstance_VideoCodec;
256
257#ifdef __cplusplus
258} /* extern "C" */
259#endif /* __cplusplus */
260
261#endif /* !C_API_ADDONINSTANCE_VIDEOCODEC_H */
diff --git a/xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/visualization.h b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/visualization.h
index 913aad8..616e0a8 100644
--- a/xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/visualization.h
+++ b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/visualization.h
@@ -6,7 +6,8 @@
6 * See LICENSES/README.md for more information. 6 * See LICENSES/README.md for more information.
7 */ 7 */
8 8
9#pragma once 9#ifndef C_API_ADDONINSTANCE_VISUALIZATION_H
10#define C_API_ADDONINSTANCE_VISUALIZATION_H
10 11
11#include "../addon_base.h" 12#include "../addon_base.h"
12 13
@@ -115,3 +116,5 @@ extern "C"
115#ifdef __cplusplus 116#ifdef __cplusplus
116} /* extern "C" */ 117} /* extern "C" */
117#endif /* __cplusplus */ 118#endif /* __cplusplus */
119
120#endif /* !C_API_ADDONINSTANCE_VISUALIZATION_H */