summaryrefslogtreecommitdiffstats
path: root/xbmc/addons/kodi-addon-dev-kit/include/kodi
diff options
context:
space:
mode:
Diffstat (limited to 'xbmc/addons/kodi-addon-dev-kit/include/kodi')
-rw-r--r--xbmc/addons/kodi-addon-dev-kit/include/kodi/AddonBase.h1
-rw-r--r--xbmc/addons/kodi-addon-dev-kit/include/kodi/CMakeLists.txt24
-rw-r--r--xbmc/addons/kodi-addon-dev-kit/include/kodi/Filesystem.h90
-rw-r--r--xbmc/addons/kodi-addon-dev-kit/include/kodi/General.h44
-rw-r--r--xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/CMakeLists.txt15
-rw-r--r--xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/Inputstream.h50
-rw-r--r--xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/Peripheral.h10
-rw-r--r--xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/PeripheralUtils.h3
-rw-r--r--xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/VideoCodec.h4
-rw-r--r--xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/CMakeLists.txt8
-rw-r--r--xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/controls/CMakeLists.txt16
-rw-r--r--xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/dialogs/CMakeLists.txt14
-rw-r--r--xbmc/addons/kodi-addon-dev-kit/include/kodi/kodi_game_types.h7
-rw-r--r--xbmc/addons/kodi-addon-dev-kit/include/kodi/libXBMC_addon.h35
-rw-r--r--xbmc/addons/kodi-addon-dev-kit/include/kodi/tools/CMakeLists.txt5
-rw-r--r--xbmc/addons/kodi-addon-dev-kit/include/kodi/versions.h24
-rw-r--r--xbmc/addons/kodi-addon-dev-kit/include/kodi/xbmc_epg_types.h11
-rw-r--r--xbmc/addons/kodi-addon-dev-kit/include/kodi/xbmc_pvr_dll.h48
-rw-r--r--xbmc/addons/kodi-addon-dev-kit/include/kodi/xbmc_pvr_types.h21
19 files changed, 322 insertions, 108 deletions
diff --git a/xbmc/addons/kodi-addon-dev-kit/include/kodi/AddonBase.h b/xbmc/addons/kodi-addon-dev-kit/include/kodi/AddonBase.h
index 0c5e617..432a1c3 100644
--- a/xbmc/addons/kodi-addon-dev-kit/include/kodi/AddonBase.h
+++ b/xbmc/addons/kodi-addon-dev-kit/include/kodi/AddonBase.h
@@ -160,6 +160,7 @@ typedef struct AddonToKodiFuncTable_Addon
160 160
161 // Function addresses used for callbacks from addon to Kodi 161 // Function addresses used for callbacks from addon to Kodi
162 void (*free_string)(void* kodiBase, char* str); 162 void (*free_string)(void* kodiBase, char* str);
163 void (*free_string_array)(void* kodiBase, char** arr, int numElements);
163 char* (*get_addon_path)(void* kodiBase); 164 char* (*get_addon_path)(void* kodiBase);
164 char* (*get_base_user_path)(void* kodiBase); 165 char* (*get_base_user_path)(void* kodiBase);
165 void (*addon_log_msg)(void* kodiBase, const int loglevel, const char *msg); 166 void (*addon_log_msg)(void* kodiBase, const int loglevel, const char *msg);
diff --git a/xbmc/addons/kodi-addon-dev-kit/include/kodi/CMakeLists.txt b/xbmc/addons/kodi-addon-dev-kit/include/kodi/CMakeLists.txt
new file mode 100644
index 0000000..80e9275
--- /dev/null
+++ b/xbmc/addons/kodi-addon-dev-kit/include/kodi/CMakeLists.txt
@@ -0,0 +1,24 @@
1set(HEADERS AddonBase.h
2 AudioEngine.h
3 Filesystem.h
4 General.h
5 Network.h
6 StreamCodec.h
7 StreamCrypto.h
8 kodi_game_dll.h
9 kodi_game_types.h
10 kodi_vfs_types.h
11 libKODI_game.h
12 libKODI_guilib.h
13 libXBMC_addon.h
14 libXBMC_pvr.h
15 versions.h
16 xbmc_addon_dll.h
17 xbmc_addon_types.h
18 xbmc_epg_types.h
19 xbmc_pvr_dll.h
20 xbmc_pvr_types.h)
21
22if(NOT ENABLE_STATIC_LIBS)
23 core_add_library(addons_kodi-addon-dev-kit_include_kodi)
24endif()
diff --git a/xbmc/addons/kodi-addon-dev-kit/include/kodi/Filesystem.h b/xbmc/addons/kodi-addon-dev-kit/include/kodi/Filesystem.h
index b06770c..b089da3 100644
--- a/xbmc/addons/kodi-addon-dev-kit/include/kodi/Filesystem.h
+++ b/xbmc/addons/kodi-addon-dev-kit/include/kodi/Filesystem.h
@@ -22,11 +22,16 @@
22#include "AddonBase.h" 22#include "AddonBase.h"
23 23
24#include <map> 24#include <map>
25#include <vector>
25 26
26#if !defined(_WIN32) 27#if !defined(_WIN32)
27 #include <sys/stat.h> 28 #include <sys/stat.h>
28 #if !defined(__stat64) 29 #if !defined(__stat64)
29 #define __stat64 stat64 30 #if defined(TARGET_DARWIN) || defined(TARGET_FREEBSD)
31 #define __stat64 stat
32 #else
33 #define __stat64 stat64
34 #endif
30 #endif 35 #endif
31#endif 36#endif
32#ifdef _WIN32 // windows 37#ifdef _WIN32 // windows
@@ -110,7 +115,7 @@ extern "C"
110 double (*get_file_download_speed)(void* kodiBase, void* file); 115 double (*get_file_download_speed)(void* kodiBase, void* file);
111 void (*close_file)(void* kodiBase, void* file); 116 void (*close_file)(void* kodiBase, void* file);
112 int (*get_file_chunk_size)(void* kodiBase, void* file); 117 int (*get_file_chunk_size)(void* kodiBase, void* file);
113 char* (*get_property)(void* kodiBase, void* file, int type, const char *name); 118 char** (*get_property_values)(void* kodiBase, void* file, int type, const char *name, int *numValues);
114 119
115 void* (*curl_create)(void* kodiBase, const char* url); 120 void* (*curl_create)(void* kodiBase, const char* url);
116 bool (*curl_add_option)(void* kodiBase, void* file, int type, const char* name, const char* value); 121 bool (*curl_add_option)(void* kodiBase, void* file, int type, const char* name, const char* value);
@@ -180,16 +185,40 @@ typedef enum OpenFileFlags
180 185
181//============================================================================== 186//==============================================================================
182/// \ingroup cpp_kodi_vfs_Defs 187/// \ingroup cpp_kodi_vfs_Defs
183/// @brief Used CURL message types 188/// @brief CURL message types
189///
190/// Used on kodi::vfs::CFile::CURLAddOption()
184/// 191///
185typedef enum CURLOptiontype 192typedef enum CURLOptiontype
186{ 193{
187 /// Set a general option 194 /// Set a general option
188 ADDON_CURL_OPTION_OPTION, 195 ADDON_CURL_OPTION_OPTION,
196
189 /// Set a protocol option 197 /// Set a protocol option
198 ///
199 /// The following names for *ADDON_CURL_OPTION_PROTOCOL* are possible:
200 ///
201 /// | Option name | Description
202 /// |---------------------------:|:----------------------------------------------------------
203 /// | accept-charset | Set the "accept-charset" header
204 /// | acceptencoding or encoding | Set the "accept-encoding" header
205 /// | active-remote | Set the "active-remote" header
206 /// | auth | Set the authentication method. Possible values: any, anysafe, digest, ntlm
207 /// | connection-timeout | Set the connection timeout in seconds
208 /// | cookie | Set the "cookie" header
209 /// | customrequest | Set a custom HTTP request like DELETE
210 /// | noshout | Set to true if kodi detects a stream as shoutcast by mistake.
211 /// | postdata | Set the post body (value needs to be base64 encoded). (Implicitly sets the request to POST)
212 /// | referer | Set the "referer" header
213 /// | user-agent | Set the "user-agent" header
214 /// | seekable | Set the stream seekable. 1: enable, 0: disable
215 /// | sslcipherlist | Set list of accepted SSL ciphers.
216 ///
190 ADDON_CURL_OPTION_PROTOCOL, 217 ADDON_CURL_OPTION_PROTOCOL,
218
191 /// Set User and password 219 /// Set User and password
192 ADDON_CURL_OPTION_CREDENTIALS, 220 ADDON_CURL_OPTION_CREDENTIALS,
221
193 /// Add a Header 222 /// Add a Header
194 ADDON_CURL_OPTION_HEADER 223 ADDON_CURL_OPTION_HEADER
195} CURLOptiontype; 224} CURLOptiontype;
@@ -197,7 +226,9 @@ typedef enum CURLOptiontype
197 226
198//============================================================================== 227//==============================================================================
199/// \ingroup cpp_kodi_vfs_Defs 228/// \ingroup cpp_kodi_vfs_Defs
200/// @brief Used CURL message types 229/// @brief CURL message types
230///
231/// Used on kodi::vfs::CFile::GetPropertyValue() and kodi::vfs::CFile::GetPropertyValues()
201/// 232///
202typedef enum FilePropertyTypes 233typedef enum FilePropertyTypes
203{ 234{
@@ -210,7 +241,9 @@ typedef enum FilePropertyTypes
210 /// Get file content charset 241 /// Get file content charset
211 ADDON_FILE_PROPERTY_CONTENT_CHARSET, 242 ADDON_FILE_PROPERTY_CONTENT_CHARSET,
212 /// Get file mime type 243 /// Get file mime type
213 ADDON_FILE_PROPERTY_MIME_TYPE 244 ADDON_FILE_PROPERTY_MIME_TYPE,
245 /// Get file effective URL (last one if redirected)
246 ADDON_FILE_PROPERTY_EFFECTIVE_URL
214} FilePropertyTypes; 247} FilePropertyTypes;
215//------------------------------------------------------------------------------ 248//------------------------------------------------------------------------------
216 249
@@ -1027,7 +1060,7 @@ namespace vfs
1027 /// #include <kodi/Filesystem.h> 1060 /// #include <kodi/Filesystem.h>
1028 /// ... 1061 /// ...
1029 /// STAT_STRUCTURE statFile; 1062 /// STAT_STRUCTURE statFile;
1030 /// int ret = kodi::vfs::StatFile("special://temp/kodi.log", &statFile); 1063 /// int ret = kodi::vfs::StatFile("special://temp/kodi.log", statFile);
1031 /// fprintf(stderr, "deviceId (ID of device containing file) = %u\n" 1064 /// fprintf(stderr, "deviceId (ID of device containing file) = %u\n"
1032 /// "size (total size, in bytes) = %lu\n" 1065 /// "size (total size, in bytes) = %lu\n"
1033 /// "accessTime (time of last access) = %lu\n" 1066 /// "accessTime (time of last access) = %lu\n"
@@ -1540,22 +1573,51 @@ namespace vfs
1540 /// @param[in] name The name of a named property value (e.g. Header) 1573 /// @param[in] name The name of a named property value (e.g. Header)
1541 /// @return value of requested property, empty on failure / non-existance 1574 /// @return value of requested property, empty on failure / non-existance
1542 /// 1575 ///
1543 const std::string GetProperty(FilePropertyTypes type, const std::string &name) const 1576 const std::string GetPropertyValue(FilePropertyTypes type, const std::string &name) const
1544 { 1577 {
1545 if (!m_file) 1578 if (!m_file)
1546 { 1579 {
1547 kodi::Log(ADDON_LOG_ERROR, "kodi::vfs::CURLCreate(...) needed to call before GetProperty!"); 1580 kodi::Log(ADDON_LOG_ERROR, "kodi::vfs::CURLCreate(...) needed to call before GetPropertyValue!");
1581 return "";
1582 }
1583 std::vector<std::string> values = GetPropertyValues(type, name);
1584 if (values.empty()) {
1548 return ""; 1585 return "";
1549 } 1586 }
1550 char *res(::kodi::addon::CAddonBase::m_interface->toKodi->kodi_filesystem->get_property( 1587 return values[0];
1551 ::kodi::addon::CAddonBase::m_interface->toKodi->kodiBase, m_file, type, name.c_str())); 1588 }
1589 //--------------------------------------------------------------------------
1590
1591 //==========================================================================
1592 ///
1593 /// @ingroup cpp_kodi_vfs_CFile
1594 /// @brief retrieve file property values
1595 ///
1596 /// @param[in] type The type of the file property values to retrieve the value for
1597 /// @param[in] name The name of the named property (e.g. Header)
1598 /// @return values of requested property, empty vector on failure / non-existance
1599 ///
1600 const std::vector<std::string> GetPropertyValues(FilePropertyTypes type, const std::string &name) const
1601 {
1602 if (!m_file)
1603 {
1604 kodi::Log(ADDON_LOG_ERROR, "kodi::vfs::CURLCreate(...) needed to call before GetPropertyValues!");
1605 return std::vector<std::string>();
1606 }
1607 int numValues;
1608 char **res(::kodi::addon::CAddonBase::m_interface->toKodi->kodi_filesystem->get_property_values(
1609 ::kodi::addon::CAddonBase::m_interface->toKodi->kodiBase, m_file, type, name.c_str(), &numValues));
1552 if (res) 1610 if (res)
1553 { 1611 {
1554 std::string strReturn(res); 1612 std::vector<std::string> vecReturn;
1555 ::kodi::addon::CAddonBase::m_interface->toKodi->free_string(::kodi::addon::CAddonBase::m_interface->toKodi->kodiBase, res); 1613 for (int i = 0; i < numValues; ++i)
1556 return strReturn; 1614 {
1615 vecReturn.emplace_back(res[i]);
1616 }
1617 ::kodi::addon::CAddonBase::m_interface->toKodi->free_string_array(::kodi::addon::CAddonBase::m_interface->toKodi->kodiBase, res, numValues);
1618 return vecReturn;
1557 } 1619 }
1558 return ""; 1620 return std::vector<std::string>();
1559 } 1621 }
1560 //-------------------------------------------------------------------------- 1622 //--------------------------------------------------------------------------
1561 1623
diff --git a/xbmc/addons/kodi-addon-dev-kit/include/kodi/General.h b/xbmc/addons/kodi-addon-dev-kit/include/kodi/General.h
index f4295ea..22d31f1 100644
--- a/xbmc/addons/kodi-addon-dev-kit/include/kodi/General.h
+++ b/xbmc/addons/kodi-addon-dev-kit/include/kodi/General.h
@@ -37,7 +37,7 @@ typedef struct AddonToKodiFuncTable_kodi
37 char* (*get_addon_info)(void* kodiBase, const char* id); 37 char* (*get_addon_info)(void* kodiBase, const char* id);
38 bool (*open_settings_dialog)(void* kodiBase); 38 bool (*open_settings_dialog)(void* kodiBase);
39 char* (*unknown_to_utf8)(void* kodiBase, const char* source, bool* ret, bool failOnBadChar); 39 char* (*unknown_to_utf8)(void* kodiBase, const char* source, bool* ret, bool failOnBadChar);
40 char* (*get_localized_string)(void* kodiBase, long dwCode); 40 char* (*get_localized_string)(void* kodiBase, long label_id);
41 char* (*get_language)(void* kodiBase, int format, bool region); 41 char* (*get_language)(void* kodiBase, int format, bool region);
42 bool (*queue_notification)(void* kodiBase, int type, const char* header, const char* message, const char* imageFile, unsigned int displayTime, bool withSound, unsigned int messageTime); 42 bool (*queue_notification)(void* kodiBase, int type, const char* header, const char* message, const char* imageFile, unsigned int displayTime, bool withSound, unsigned int messageTime);
43 void (*get_md5)(void* kodiBase, const char* text, char* md5); 43 void (*get_md5)(void* kodiBase, const char* text, char* md5);
@@ -46,6 +46,7 @@ typedef struct AddonToKodiFuncTable_kodi
46 void (*get_free_mem)(void* kodiBase, long* free, long* total, bool as_bytes); 46 void (*get_free_mem)(void* kodiBase, long* free, long* total, bool as_bytes);
47 int (*get_global_idle_time)(void* kodiBase); 47 int (*get_global_idle_time)(void* kodiBase);
48 void (*kodi_version)(void* kodiBase, char** compile_name, int* major, int* minor, char** revision, char** tag, char** tagversion); 48 void (*kodi_version)(void* kodiBase, char** compile_name, int* major, int* minor, char** revision, char** tag, char** tagversion);
49 char* (*get_current_skin_id)(void* kodiBase);
49} AddonToKodiFuncTable_kodi; 50} AddonToKodiFuncTable_kodi;
50 51
51//============================================================================== 52//==============================================================================
@@ -623,6 +624,47 @@ inline int GetGlobalIdleTime()
623namespace kodi { 624namespace kodi {
624/// 625///
625/// \ingroup cpp_kodi 626/// \ingroup cpp_kodi
627/// @brief Get the currently used skin identification name from Kodi
628///-----------------------------------------------------------------------
629///
630/// @return The active skin id name as a string
631///
632///
633/// @note This is not the full path like 'special://home/addons/MediaCenter',
634/// but only 'MediaCenter'.
635///
636///
637/// ------------------------------------------------------------------------
638///
639/// **Example:**
640/// ~~~~~~~~~~~~~{.cpp}
641/// #include <kodi/General.h>
642/// ..
643/// std::string skinid = kodi::GetCurrentSkinId();
644/// ..
645/// ~~~~~~~~~~~~~
646///
647inline std::string GetCurrentSkinId()
648{
649 AddonToKodiFuncTable_Addon* toKodi = ::kodi::addon::CAddonBase::m_interface->toKodi;
650
651 std::string strReturn;
652 char* strMsg = toKodi->kodi->get_current_skin_id(toKodi->kodiBase);
653 if (strMsg != nullptr)
654 {
655 if (std::strlen(strMsg))
656 strReturn = strMsg;
657 toKodi->free_string(toKodi->kodiBase, strMsg);
658 }
659 return strReturn;
660}
661} /* namespace kodi */
662//------------------------------------------------------------------------------
663
664//==============================================================================
665namespace kodi {
666///
667/// \ingroup cpp_kodi
626/// @brief Get current Kodi informations and versions, returned data from the following 668/// @brief Get current Kodi informations and versions, returned data from the following
627/// <b><tt>kodi_version_t version; kodi::KodiVersion(version);</tt></b> 669/// <b><tt>kodi_version_t version; kodi::KodiVersion(version);</tt></b>
628/// is e.g.: 670/// is e.g.:
diff --git a/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/CMakeLists.txt b/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/CMakeLists.txt
new file mode 100644
index 0000000..ba4f889
--- /dev/null
+++ b/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/CMakeLists.txt
@@ -0,0 +1,15 @@
1set(HEADERS AudioDSP.h
2 AudioDecoder.h
3 AudioEncoder.h
4 ImageDecoder.h
5 Inputstream.h
6 Peripheral.h
7 PeripheralUtils.h
8 Screensaver.h
9 VFS.h
10 VideoCodec.h
11 Visualization.h)
12
13if(NOT ENABLE_STATIC_LIBS)
14 core_add_library(addons_kodi-addon-dev-kit_include_kodi_addon-instance)
15endif()
diff --git a/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/Inputstream.h b/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/Inputstream.h
index 8db17c0..08d01ad 100644
--- a/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/Inputstream.h
+++ b/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/Inputstream.h
@@ -29,9 +29,9 @@
29#include "../StreamCodec.h" 29#include "../StreamCodec.h"
30 30
31#ifdef BUILD_KODI_ADDON 31#ifdef BUILD_KODI_ADDON
32#include "../DVDDemuxPacket.h" 32#include "../DemuxPacket.h"
33#else 33#else
34#include "cores/VideoPlayer/DVDDemuxers/DVDDemuxPacket.h" 34#include "cores/VideoPlayer/Interface/Addon/DemuxPacket.h"
35#endif 35#endif
36 36
37namespace kodi { namespace addon { class CInstanceInputStream; }} 37namespace kodi { namespace addon { class CInstanceInputStream; }}
@@ -41,7 +41,7 @@ extern "C" {
41 /*! 41 /*!
42 * @brief InputStream add-on capabilities. All capabilities are set to "false" as default. 42 * @brief InputStream add-on capabilities. All capabilities are set to "false" as default.
43 */ 43 */
44 typedef struct INPUTSTREAM_CAPABILITIES 44 struct INPUTSTREAM_CAPABILITIES
45 { 45 {
46 enum MASKTYPE: uint32_t 46 enum MASKTYPE: uint32_t
47 { 47 {
@@ -58,17 +58,20 @@ extern "C" {
58 SUPPORTS_SEEK = (1 << 3), 58 SUPPORTS_SEEK = (1 << 3),
59 59
60 /// supports pause 60 /// supports pause
61 SUPPORTS_PAUSE = (1 << 4) 61 SUPPORTS_PAUSE = (1 << 4),
62
63 /// supports interface ITime
64 SUPPORTS_ITIME = (1 << 5)
62 }; 65 };
63 66
64 /// set of supported capabilities 67 /// set of supported capabilities
65 uint32_t m_mask; 68 uint32_t m_mask;
66 } INPUTSTREAM_CAPABILITIES; 69 };
67 70
68 /*! 71 /*!
69 * @brief structure of key/value pairs passed to addon on Open() 72 * @brief structure of key/value pairs passed to addon on Open()
70 */ 73 */
71 typedef struct INPUTSTREAM 74 struct INPUTSTREAM
72 { 75 {
73 static const unsigned int MAX_INFO_COUNT = 8; 76 static const unsigned int MAX_INFO_COUNT = 8;
74 77
@@ -83,22 +86,22 @@ extern "C" {
83 86
84 const char *m_libFolder; 87 const char *m_libFolder;
85 const char *m_profileFolder; 88 const char *m_profileFolder;
86 } INPUTSTREAM; 89 };
87 90
88 /*! 91 /*!
89 * @brief Array of stream IDs 92 * @brief Array of stream IDs
90 */ 93 */
91 typedef struct INPUTSTREAM_IDS 94 struct INPUTSTREAM_IDS
92 { 95 {
93 static const unsigned int MAX_STREAM_COUNT = 32; 96 static const unsigned int MAX_STREAM_COUNT = 32;
94 unsigned int m_streamCount; 97 unsigned int m_streamCount;
95 unsigned int m_streamIds[MAX_STREAM_COUNT]; 98 unsigned int m_streamIds[MAX_STREAM_COUNT];
96 } INPUTSTREAM_IDS; 99 };
97 100
98 /*! 101 /*!
99 * @brief stream properties 102 * @brief stream properties
100 */ 103 */
101 typedef struct INPUTSTREAM_INFO 104 struct INPUTSTREAM_INFO
102 { 105 {
103 enum STREAM_TYPE 106 enum STREAM_TYPE
104 { 107 {
@@ -130,6 +133,7 @@ extern "C" {
130 }; 133 };
131 uint32_t m_flags; 134 uint32_t m_flags;
132 135
136 char m_name[256]; /*!< @brief (optinal) name of the stream, \0 for default handling */
133 char m_codecName[32]; /*!< @brief (required) name of codec according to ffmpeg */ 137 char m_codecName[32]; /*!< @brief (required) name of codec according to ffmpeg */
134 char m_codecInternalName[32]; /*!< @brief (optional) internal name of codec (selectionstream info) */ 138 char m_codecInternalName[32]; /*!< @brief (optional) internal name of codec (selectionstream info) */
135 STREAMCODEC_PROFILE m_codecProfile; /*!< @brief (optional) the profile of the codec */ 139 STREAMCODEC_PROFILE m_codecProfile; /*!< @brief (optional) the profile of the codec */
@@ -153,7 +157,15 @@ extern "C" {
153 unsigned int m_BlockAlign; 157 unsigned int m_BlockAlign;
154 158
155 CRYPTO_INFO m_cryptoInfo; 159 CRYPTO_INFO m_cryptoInfo;
156 } INPUTSTREAM_INFO; 160 };
161
162 struct INPUTSTREAM_TIMES
163 {
164 time_t startTime;
165 double ptsStart;
166 double ptsBegin;
167 double ptsEnd;
168 };
157 169
158 /*! 170 /*!
159 * @brief Structure to transfer the methods from xbmc_inputstream_dll.h to XBMC 171 * @brief Structure to transfer the methods from xbmc_inputstream_dll.h to XBMC
@@ -201,6 +213,9 @@ extern "C" {
201 int (__cdecl* get_total_time)(const AddonInstance_InputStream* instance); 213 int (__cdecl* get_total_time)(const AddonInstance_InputStream* instance);
202 int (__cdecl* get_time)(const AddonInstance_InputStream* instance); 214 int (__cdecl* get_time)(const AddonInstance_InputStream* instance);
203 215
216 // ITime
217 bool(__cdecl* get_times)(const AddonInstance_InputStream* instance, INPUTSTREAM_TIMES *times);
218
204 // IPosTime 219 // IPosTime
205 bool (__cdecl* pos_time)(const AddonInstance_InputStream* instance, int ms); 220 bool (__cdecl* pos_time)(const AddonInstance_InputStream* instance, int ms);
206 221
@@ -364,6 +379,12 @@ namespace addon
364 virtual int GetTime() { return -1; } 379 virtual int GetTime() { return -1; }
365 380
366 /*! 381 /*!
382 * Get current timing values in PTS scale
383 * @remarks
384 */
385 virtual bool GetTimes(INPUTSTREAM_TIMES &times) { return false; }
386
387 /*!
367 * Positions inputstream to playing time given in ms 388 * Positions inputstream to playing time given in ms
368 * @remarks 389 * @remarks
369 */ 390 */
@@ -483,6 +504,8 @@ namespace addon
483 m_instanceData->toAddon.get_total_time = ADDON_GetTotalTime; 504 m_instanceData->toAddon.get_total_time = ADDON_GetTotalTime;
484 m_instanceData->toAddon.get_time = ADDON_GetTime; 505 m_instanceData->toAddon.get_time = ADDON_GetTime;
485 506
507 m_instanceData->toAddon.get_times = ADDON_GetTimes;
508
486 m_instanceData->toAddon.pos_time = ADDON_PosTime; 509 m_instanceData->toAddon.pos_time = ADDON_PosTime;
487 510
488 m_instanceData->toAddon.can_pause_stream = ADDON_CanPauseStream; 511 m_instanceData->toAddon.can_pause_stream = ADDON_CanPauseStream;
@@ -580,6 +603,11 @@ namespace addon
580 return instance->toAddon.addonInstance->GetTime(); 603 return instance->toAddon.addonInstance->GetTime();
581 } 604 }
582 605
606 // ITime
607 inline static bool ADDON_GetTimes(const AddonInstance_InputStream* instance, INPUTSTREAM_TIMES *times)
608 {
609 return instance->toAddon.addonInstance->GetTimes(*times);
610 }
583 611
584 // IPosTime 612 // IPosTime
585 inline static bool ADDON_PosTime(const AddonInstance_InputStream* instance, int ms) 613 inline static bool ADDON_PosTime(const AddonInstance_InputStream* instance, int ms)
diff --git a/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/Peripheral.h b/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/Peripheral.h
index c1a18e0..0dae06c 100644
--- a/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/Peripheral.h
+++ b/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/Peripheral.h
@@ -212,6 +212,8 @@ extern "C"
212 JOYSTICK_FEATURE_TYPE_MOTOR, 212 JOYSTICK_FEATURE_TYPE_MOTOR,
213 JOYSTICK_FEATURE_TYPE_RELPOINTER, 213 JOYSTICK_FEATURE_TYPE_RELPOINTER,
214 JOYSTICK_FEATURE_TYPE_ABSPOINTER, 214 JOYSTICK_FEATURE_TYPE_ABSPOINTER,
215 JOYSTICK_FEATURE_TYPE_WHEEL,
216 JOYSTICK_FEATURE_TYPE_THROTTLE,
215 } JOYSTICK_FEATURE_TYPE; 217 } JOYSTICK_FEATURE_TYPE;
216 218
217 typedef enum JOYSTICK_FEATURE_PRIMITIVE 219 typedef enum JOYSTICK_FEATURE_PRIMITIVE
@@ -233,6 +235,14 @@ extern "C"
233 // Motor 235 // Motor
234 JOYSTICK_MOTOR_PRIMITIVE = 0, 236 JOYSTICK_MOTOR_PRIMITIVE = 0,
235 237
238 // Wheel
239 JOYSTICK_WHEEL_LEFT = 0,
240 JOYSTICK_WHEEL_RIGHT = 1,
241
242 // Throttle
243 JOYSTICK_THROTTLE_UP = 0,
244 JOYSTICK_THROTTLE_DOWN = 1,
245
236 // Maximum number of primitives 246 // Maximum number of primitives
237 JOYSTICK_PRIMITIVE_MAX = 4, 247 JOYSTICK_PRIMITIVE_MAX = 4,
238 } JOYSTICK_FEATURE_PRIMITIVE; 248 } JOYSTICK_FEATURE_PRIMITIVE;
diff --git a/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/PeripheralUtils.h b/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/PeripheralUtils.h
index ea70b30..3c4cab3 100644
--- a/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/PeripheralUtils.h
+++ b/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/PeripheralUtils.h
@@ -581,6 +581,9 @@ namespace addon
581 * 3) accelerometer 581 * 3) accelerometer
582 * 4) motor 582 * 4) motor
583 * 5) relative pointer[2] 583 * 5) relative pointer[2]
584 * 6) absolute pointer
585 * 7) wheel
586 * 8) throttle
584 * 587 *
585 * [1] All three driver primitives (buttons, hats and axes) have a state that 588 * [1] All three driver primitives (buttons, hats and axes) have a state that
586 * can be represented using a single scalar value. For this reason, 589 * can be represented using a single scalar value. For this reason,
diff --git a/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/VideoCodec.h b/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/VideoCodec.h
index 02d39c6..eb4351e 100644
--- a/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/VideoCodec.h
+++ b/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/VideoCodec.h
@@ -25,9 +25,9 @@
25#include "../StreamCodec.h" 25#include "../StreamCodec.h"
26 26
27#ifdef BUILD_KODI_ADDON 27#ifdef BUILD_KODI_ADDON
28#include "../DVDDemuxPacket.h" 28#include "../DemuxPacket.h"
29#else 29#else
30#include "cores/VideoPlayer/DVDDemuxers/DVDDemuxPacket.h" 30#include "cores/VideoPlayer/Interface/Addon/DemuxPacket.h"
31#endif 31#endif
32 32
33namespace kodi { namespace addon { class CInstanceVideoCodec; } } 33namespace kodi { namespace addon { class CInstanceVideoCodec; } }
diff --git a/xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/CMakeLists.txt b/xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/CMakeLists.txt
new file mode 100644
index 0000000..91cef7f
--- /dev/null
+++ b/xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/CMakeLists.txt
@@ -0,0 +1,8 @@
1set(HEADERS General.h
2 ListItem.h
3 Window.h
4 definitions.h)
5
6if(NOT ENABLE_STATIC_LIBS)
7 core_add_library(addons_kodi-addon-dev-kit_include_kodi_gui)
8endif()
diff --git a/xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/controls/CMakeLists.txt b/xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/controls/CMakeLists.txt
new file mode 100644
index 0000000..c7cc1dd
--- /dev/null
+++ b/xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/controls/CMakeLists.txt
@@ -0,0 +1,16 @@
1set(HEADERS Button.h
2 Edit.h
3 FadeLabel.h
4 Image.h
5 Label.h
6 Progress.h
7 RadioButton.h
8 Rendering.h
9 SettingsSlider.h
10 Slider.h
11 Spin.h
12 TextBox.h)
13
14if(NOT ENABLE_STATIC_LIBS)
15 core_add_library(addons_kodi-addon-dev-kit_include_kodi_gui_controls)
16endif()
diff --git a/xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/dialogs/CMakeLists.txt b/xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/dialogs/CMakeLists.txt
new file mode 100644
index 0000000..7227343
--- /dev/null
+++ b/xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/dialogs/CMakeLists.txt
@@ -0,0 +1,14 @@
1set(HEADERS ContextMenu.h
2 ExtendedProgress.h
3 FileBrowser.h
4 Keyboard.h
5 Numeric.h
6 OK.h
7 Progress.h
8 Select.h
9 TextViewer.h
10 YesNo.h)
11
12if(NOT ENABLE_STATIC_LIBS)
13 core_add_library(addons_kodi-addon-dev-kit_include_kodi_gui_dialogs)
14endif()
diff --git a/xbmc/addons/kodi-addon-dev-kit/include/kodi/kodi_game_types.h b/xbmc/addons/kodi-addon-dev-kit/include/kodi/kodi_game_types.h
index da02f6f..d4568e7 100644
--- a/xbmc/addons/kodi-addon-dev-kit/include/kodi/kodi_game_types.h
+++ b/xbmc/addons/kodi-addon-dev-kit/include/kodi/kodi_game_types.h
@@ -170,6 +170,7 @@ typedef enum GAME_INPUT_EVENT_SOURCE
170{ 170{
171 GAME_INPUT_EVENT_DIGITAL_BUTTON, 171 GAME_INPUT_EVENT_DIGITAL_BUTTON,
172 GAME_INPUT_EVENT_ANALOG_BUTTON, 172 GAME_INPUT_EVENT_ANALOG_BUTTON,
173 GAME_INPUT_EVENT_AXIS,
173 GAME_INPUT_EVENT_ANALOG_STICK, 174 GAME_INPUT_EVENT_ANALOG_STICK,
174 GAME_INPUT_EVENT_ACCELEROMETER, 175 GAME_INPUT_EVENT_ACCELEROMETER,
175 GAME_INPUT_EVENT_KEY, 176 GAME_INPUT_EVENT_KEY,
@@ -299,6 +300,11 @@ typedef struct game_analog_button_event
299 float magnitude; 300 float magnitude;
300} ATTRIBUTE_PACKED game_analog_button_event; 301} ATTRIBUTE_PACKED game_analog_button_event;
301 302
303typedef struct game_axis_event
304{
305 float position;
306} ATTRIBUTE_PACKED game_axis_event;
307
302typedef struct game_analog_stick_event 308typedef struct game_analog_stick_event
303{ 309{
304 float x; 310 float x;
@@ -347,6 +353,7 @@ typedef struct game_input_event
347 { 353 {
348 struct game_digital_button_event digital_button; 354 struct game_digital_button_event digital_button;
349 struct game_analog_button_event analog_button; 355 struct game_analog_button_event analog_button;
356 struct game_axis_event axis;
350 struct game_analog_stick_event analog_stick; 357 struct game_analog_stick_event analog_stick;
351 struct game_accelerometer_event accelerometer; 358 struct game_accelerometer_event accelerometer;
352 struct game_key_event key; 359 struct game_key_event key;
diff --git a/xbmc/addons/kodi-addon-dev-kit/include/kodi/libXBMC_addon.h b/xbmc/addons/kodi-addon-dev-kit/include/kodi/libXBMC_addon.h
index c264578..5ef6bdc 100644
--- a/xbmc/addons/kodi-addon-dev-kit/include/kodi/libXBMC_addon.h
+++ b/xbmc/addons/kodi-addon-dev-kit/include/kodi/libXBMC_addon.h
@@ -139,6 +139,7 @@ typedef struct CB_AddOn
139 char* (*GetLocalizedString)(const void* addonData, long dwCode); 139 char* (*GetLocalizedString)(const void* addonData, long dwCode);
140 char* (*GetDVDMenuLanguage)(const void* addonData); 140 char* (*GetDVDMenuLanguage)(const void* addonData);
141 void (*FreeString)(const void* addonData, char* str); 141 void (*FreeString)(const void* addonData, char* str);
142 void (*FreeStringArray)(const void* addonData, char** arr, int numElements);
142 143
143 void* (*OpenFile)(const void* addonData, const char* strFileName, unsigned int flags); 144 void* (*OpenFile)(const void* addonData, const char* strFileName, unsigned int flags);
144 void* (*OpenFileForWrite)(const void* addonData, const char* strFileName, bool bOverWrite); 145 void* (*OpenFileForWrite)(const void* addonData, const char* strFileName, bool bOverWrite);
@@ -155,7 +156,8 @@ typedef struct CB_AddOn
155 int (*GetFileChunkSize)(const void* addonData, void* file); 156 int (*GetFileChunkSize)(const void* addonData, void* file);
156 bool (*FileExists)(const void* addonData, const char *strFileName, bool bUseCache); 157 bool (*FileExists)(const void* addonData, const char *strFileName, bool bUseCache);
157 int (*StatFile)(const void* addonData, const char *strFileName, struct __stat64* buffer); 158 int (*StatFile)(const void* addonData, const char *strFileName, struct __stat64* buffer);
158 char *(*GetFileProperty)(const void* addonData, void* file, XFILE::FileProperty type, const char *name); 159 char *(*GetFilePropertyValue)(const void* addonData, void* file, XFILE::FileProperty type, const char *name);
160 char **(*GetFilePropertyValues)(const void* addonData, void* file, XFILE::FileProperty type, const char *name, int *numPorperties);
159 bool (*DeleteFile)(const void* addonData, const char *strFileName); 161 bool (*DeleteFile)(const void* addonData, const char *strFileName);
160 bool (*CanOpenDirectory)(const void* addonData, const char* strURL); 162 bool (*CanOpenDirectory)(const void* addonData, const char* strURL);
161 bool (*CreateDirectory)(const void* addonData, const char *strPath); 163 bool (*CreateDirectory)(const void* addonData, const char *strPath);
@@ -299,6 +301,16 @@ namespace ADDON
299 { 301 {
300 m_Callbacks->FreeString(m_Handle->addonData, str); 302 m_Callbacks->FreeString(m_Handle->addonData, str);
301 } 303 }
304
305 /*!
306 * @brief Free the memory used by arr including its elements
307 * @param arr The string array to free
308 * @param numElements The length of the array
309 */
310 void FreeStringArray(char** arr, int numElements)
311 {
312 m_Callbacks->FreeStringArray(m_Handle->addonData, arr, numElements);
313 }
302 314
303 /*! 315 /*!
304 * @brief Open the file with filename via XBMC's CFile. Needs to be closed by calling CloseFile() when done. 316 * @brief Open the file with filename via XBMC's CFile. Needs to be closed by calling CloseFile() when done.
@@ -468,13 +480,26 @@ namespace ADDON
468 /*! 480 /*!
469 * @brief Get a property from an open file. 481 * @brief Get a property from an open file.
470 * @param file The file to get an property for 482 * @param file The file to get an property for
471 * @param type type of the requested property. 483 * @param type Type of the requested property.
472 * @param name of the requested property / can be null. 484 * @param name Name of the requested property / can be null.
473 * @return The value of the requested property, must be FreeString'ed. 485 * @return The value of the requested property, must be FreeString'ed.
474 */ 486 */
475 char *GetFileProperty(void* file, XFILE::FileProperty type, const char *name) 487 char *GetFilePropertyValue(void* file, XFILE::FileProperty type, const char *name)
488 {
489 return m_Callbacks->GetFilePropertyValue(m_Handle->addonData, file, type, name);
490 }
491
492 /*!
493 * @brief Get multiple property values from an open file.
494 * @param file The file to get the property values for
495 * @param type Type of the requested property.
496 * @param name Name of the requested property / can be null.
497 * @param numValues Number of property values returned.
498 * @return List of values of the requested property, must be FreeStringArray'ed.
499 */
500 char **GetFilePropertyValues(void* file, XFILE::FileProperty type, const char *name, int *numValues)
476 { 501 {
477 return m_Callbacks->GetFileProperty(m_Handle->addonData, file, type, name); 502 return m_Callbacks->GetFilePropertyValues(m_Handle->addonData, file, type, name, numValues);
478 } 503 }
479 504
480 /*! 505 /*!
diff --git a/xbmc/addons/kodi-addon-dev-kit/include/kodi/tools/CMakeLists.txt b/xbmc/addons/kodi-addon-dev-kit/include/kodi/tools/CMakeLists.txt
new file mode 100644
index 0000000..939585c
--- /dev/null
+++ b/xbmc/addons/kodi-addon-dev-kit/include/kodi/tools/CMakeLists.txt
@@ -0,0 +1,5 @@
1set(HEADERS DllHelper.h )
2
3if(NOT ENABLE_STATIC_LIBS)
4 core_add_library(addons_kodi-addon-dev-kit_include_kodi_tools)
5endif()
diff --git a/xbmc/addons/kodi-addon-dev-kit/include/kodi/versions.h b/xbmc/addons/kodi-addon-dev-kit/include/kodi/versions.h
index 32e6b1a..db8508e 100644
--- a/xbmc/addons/kodi-addon-dev-kit/include/kodi/versions.h
+++ b/xbmc/addons/kodi-addon-dev-kit/include/kodi/versions.h
@@ -41,8 +41,8 @@
41 * overview. 41 * overview.
42 */ 42 */
43 43
44#define ADDON_GLOBAL_VERSION_MAIN "1.0.11" 44#define ADDON_GLOBAL_VERSION_MAIN "1.0.12"
45#define ADDON_GLOBAL_VERSION_MAIN_MIN "1.0.11" 45#define ADDON_GLOBAL_VERSION_MAIN_MIN "1.0.12"
46#define ADDON_GLOBAL_VERSION_MAIN_XML_ID "kodi.binary.global.main" 46#define ADDON_GLOBAL_VERSION_MAIN_XML_ID "kodi.binary.global.main"
47#define ADDON_GLOBAL_VERSION_MAIN_DEPENDS "AddonBase.h" \ 47#define ADDON_GLOBAL_VERSION_MAIN_DEPENDS "AddonBase.h" \
48 "xbmc_addon_dll.h" \ 48 "xbmc_addon_dll.h" \
@@ -50,7 +50,7 @@
50 "libXBMC_addon.h" \ 50 "libXBMC_addon.h" \
51 "addon-instance/" 51 "addon-instance/"
52 52
53#define ADDON_GLOBAL_VERSION_GENERAL "1.0.2" 53#define ADDON_GLOBAL_VERSION_GENERAL "1.0.3"
54#define ADDON_GLOBAL_VERSION_GENERAL_MIN "1.0.2" 54#define ADDON_GLOBAL_VERSION_GENERAL_MIN "1.0.2"
55#define ADDON_GLOBAL_VERSION_GENERAL_XML_ID "kodi.binary.global.general" 55#define ADDON_GLOBAL_VERSION_GENERAL_XML_ID "kodi.binary.global.general"
56#define ADDON_GLOBAL_VERSION_GENERAL_DEPENDS "General.h" 56#define ADDON_GLOBAL_VERSION_GENERAL_DEPENDS "General.h"
@@ -66,8 +66,8 @@
66#define ADDON_GLOBAL_VERSION_AUDIOENGINE_XML_ID "kodi.binary.global.audioengine" 66#define ADDON_GLOBAL_VERSION_AUDIOENGINE_XML_ID "kodi.binary.global.audioengine"
67#define ADDON_GLOBAL_VERSION_AUDIOENGINE_DEPENDS "AudioEngine.h" 67#define ADDON_GLOBAL_VERSION_AUDIOENGINE_DEPENDS "AudioEngine.h"
68 68
69#define ADDON_GLOBAL_VERSION_FILESYSTEM "1.0.1" 69#define ADDON_GLOBAL_VERSION_FILESYSTEM "1.0.2"
70#define ADDON_GLOBAL_VERSION_FILESYSTEM_MIN "1.0.1" 70#define ADDON_GLOBAL_VERSION_FILESYSTEM_MIN "1.0.2"
71#define ADDON_GLOBAL_VERSION_FILESYSTEM_XML_ID "kodi.binary.global.filesystem" 71#define ADDON_GLOBAL_VERSION_FILESYSTEM_XML_ID "kodi.binary.global.filesystem"
72#define ADDON_GLOBAL_VERSION_FILESYSTEM_DEPENDS "Filesystem.h" 72#define ADDON_GLOBAL_VERSION_FILESYSTEM_DEPENDS "Filesystem.h"
73 73
@@ -91,8 +91,8 @@
91#define ADDON_INSTANCE_VERSION_AUDIOENCODER_XML_ID "kodi.binary.instance.audioencoder" 91#define ADDON_INSTANCE_VERSION_AUDIOENCODER_XML_ID "kodi.binary.instance.audioencoder"
92#define ADDON_INSTANCE_VERSION_AUDIOENCODER_DEPENDS "addon-instance/AudioEncoder.h" 92#define ADDON_INSTANCE_VERSION_AUDIOENCODER_DEPENDS "addon-instance/AudioEncoder.h"
93 93
94#define ADDON_INSTANCE_VERSION_GAME "1.0.32" 94#define ADDON_INSTANCE_VERSION_GAME "1.0.33"
95#define ADDON_INSTANCE_VERSION_GAME_MIN "1.0.32" 95#define ADDON_INSTANCE_VERSION_GAME_MIN "1.0.33"
96#define ADDON_INSTANCE_VERSION_GAME_XML_ID "kodi.binary.instance.game" 96#define ADDON_INSTANCE_VERSION_GAME_XML_ID "kodi.binary.instance.game"
97#define ADDON_INSTANCE_VERSION_GAME_DEPENDS "kodi_game_dll.h" \ 97#define ADDON_INSTANCE_VERSION_GAME_DEPENDS "kodi_game_dll.h" \
98 "kodi_game_types.h" \ 98 "kodi_game_types.h" \
@@ -103,19 +103,19 @@
103#define ADDON_INSTANCE_VERSION_IMAGEDECODER_XML_ID "kodi.binary.instance.imagedecoder" 103#define ADDON_INSTANCE_VERSION_IMAGEDECODER_XML_ID "kodi.binary.instance.imagedecoder"
104#define ADDON_INSTANCE_VERSION_IMAGEDECODER_DEPENDS "addon-instance/ImageDecoder.h" 104#define ADDON_INSTANCE_VERSION_IMAGEDECODER_DEPENDS "addon-instance/ImageDecoder.h"
105 105
106#define ADDON_INSTANCE_VERSION_INPUTSTREAM "2.0.4" 106#define ADDON_INSTANCE_VERSION_INPUTSTREAM "2.0.6"
107#define ADDON_INSTANCE_VERSION_INPUTSTREAM_MIN "2.0.4" 107#define ADDON_INSTANCE_VERSION_INPUTSTREAM_MIN "2.0.6"
108#define ADDON_INSTANCE_VERSION_INPUTSTREAM_XML_ID "kodi.binary.instance.inputstream" 108#define ADDON_INSTANCE_VERSION_INPUTSTREAM_XML_ID "kodi.binary.instance.inputstream"
109#define ADDON_INSTANCE_VERSION_INPUTSTREAM_DEPENDS "addon-instance/Inputstream.h" 109#define ADDON_INSTANCE_VERSION_INPUTSTREAM_DEPENDS "addon-instance/Inputstream.h"
110 110
111#define ADDON_INSTANCE_VERSION_PERIPHERAL "1.3.4" 111#define ADDON_INSTANCE_VERSION_PERIPHERAL "1.3.5"
112#define ADDON_INSTANCE_VERSION_PERIPHERAL_MIN "1.3.4" 112#define ADDON_INSTANCE_VERSION_PERIPHERAL_MIN "1.3.4"
113#define ADDON_INSTANCE_VERSION_PERIPHERAL_XML_ID "kodi.binary.instance.peripheral" 113#define ADDON_INSTANCE_VERSION_PERIPHERAL_XML_ID "kodi.binary.instance.peripheral"
114#define ADDON_INSTANCE_VERSION_PERIPHERAL_DEPENDS "addon-instance/Peripheral.h" \ 114#define ADDON_INSTANCE_VERSION_PERIPHERAL_DEPENDS "addon-instance/Peripheral.h" \
115 "addon-instance/PeripheralUtils.h" 115 "addon-instance/PeripheralUtils.h"
116 116
117#define ADDON_INSTANCE_VERSION_PVR "5.7.0" 117#define ADDON_INSTANCE_VERSION_PVR "5.8.0"
118#define ADDON_INSTANCE_VERSION_PVR_MIN "5.7.0" 118#define ADDON_INSTANCE_VERSION_PVR_MIN "5.8.0"
119#define ADDON_INSTANCE_VERSION_PVR_XML_ID "kodi.binary.instance.pvr" 119#define ADDON_INSTANCE_VERSION_PVR_XML_ID "kodi.binary.instance.pvr"
120#define ADDON_INSTANCE_VERSION_PVR_DEPENDS "xbmc_pvr_dll.h" \ 120#define ADDON_INSTANCE_VERSION_PVR_DEPENDS "xbmc_pvr_dll.h" \
121 "xbmc_pvr_types.h" \ 121 "xbmc_pvr_types.h" \
diff --git a/xbmc/addons/kodi-addon-dev-kit/include/kodi/xbmc_epg_types.h b/xbmc/addons/kodi-addon-dev-kit/include/kodi/xbmc_epg_types.h
index 7561ff6..1ba12bd 100644
--- a/xbmc/addons/kodi-addon-dev-kit/include/kodi/xbmc_epg_types.h
+++ b/xbmc/addons/kodi-addon-dev-kit/include/kodi/xbmc_epg_types.h
@@ -61,6 +61,9 @@
61/* Set EPGTAG.iGenreType to EPG_GENRE_USE_STRING to transfer genre strings to XBMC */ 61/* Set EPGTAG.iGenreType to EPG_GENRE_USE_STRING to transfer genre strings to XBMC */
62#define EPG_GENRE_USE_STRING 0x100 62#define EPG_GENRE_USE_STRING 0x100
63 63
64/* Separator to use in strings containing different tokens, for example writers, directors, actors of an event. */
65#define EPG_STRING_TOKEN_SEPARATOR ","
66
64#ifdef __cplusplus 67#ifdef __cplusplus
65extern "C" { 68extern "C" {
66#endif 69#endif
@@ -98,15 +101,15 @@ extern "C" {
98 const char * strPlotOutline; /*!< @brief (optional) plot outline */ 101 const char * strPlotOutline; /*!< @brief (optional) plot outline */
99 const char * strPlot; /*!< @brief (optional) plot */ 102 const char * strPlot; /*!< @brief (optional) plot */
100 const char * strOriginalTitle; /*!< @brief (optional) originaltitle */ 103 const char * strOriginalTitle; /*!< @brief (optional) originaltitle */
101 const char * strCast; /*!< @brief (optional) cast */ 104 const char * strCast; /*!< @brief (optional) cast. Use EPG_STRING_TOKEN_SEPARATOR to separate different persons. */
102 const char * strDirector; /*!< @brief (optional) director */ 105 const char * strDirector; /*!< @brief (optional) director(s). Use EPG_STRING_TOKEN_SEPARATOR to separate different persons. */
103 const char * strWriter; /*!< @brief (optional) writer */ 106 const char * strWriter; /*!< @brief (optional) writer(s). Use EPG_STRING_TOKEN_SEPARATOR to separate different persons. */
104 int iYear; /*!< @brief (optional) year */ 107 int iYear; /*!< @brief (optional) year */
105 const char * strIMDBNumber; /*!< @brief (optional) IMDBNumber */ 108 const char * strIMDBNumber; /*!< @brief (optional) IMDBNumber */
106 const char * strIconPath; /*!< @brief (optional) icon path */ 109 const char * strIconPath; /*!< @brief (optional) icon path */
107 int iGenreType; /*!< @brief (optional) genre type */ 110 int iGenreType; /*!< @brief (optional) genre type */
108 int iGenreSubType; /*!< @brief (optional) genre sub type */ 111 int iGenreSubType; /*!< @brief (optional) genre sub type */
109 const char * strGenreDescription; /*!< @brief (optional) genre. Will be used only when iGenreType = EPG_GENRE_USE_STRING */ 112 const char * strGenreDescription; /*!< @brief (optional) genre. Will be used only when iGenreType == EPG_GENRE_USE_STRING. Use EPG_STRING_TOKEN_SEPARATOR to separate different genres. */
110 time_t firstAired; /*!< @brief (optional) first aired in UTC */ 113 time_t firstAired; /*!< @brief (optional) first aired in UTC */
111 int iParentalRating; /*!< @brief (optional) parental rating */ 114 int iParentalRating; /*!< @brief (optional) parental rating */
112 int iStarRating; /*!< @brief (optional) star rating */ 115 int iStarRating; /*!< @brief (optional) star rating */
diff --git a/xbmc/addons/kodi-addon-dev-kit/include/kodi/xbmc_pvr_dll.h b/xbmc/addons/kodi-addon-dev-kit/include/kodi/xbmc_pvr_dll.h
index 019644b..25cacb4 100644
--- a/xbmc/addons/kodi-addon-dev-kit/include/kodi/xbmc_pvr_dll.h
+++ b/xbmc/addons/kodi-addon-dev-kit/include/kodi/xbmc_pvr_dll.h
@@ -211,14 +211,6 @@ extern "C"
211 PVR_ERROR RenameChannel(const PVR_CHANNEL& channel); 211 PVR_ERROR RenameChannel(const PVR_CHANNEL& channel);
212 212
213 /*! 213 /*!
214 * Move a channel to another channel number on the backend.
215 * @param channel The channel to move, containing the new channel number.
216 * @return PVR_ERROR_NO_ERROR if the channel has been moved successfully.
217 * @remarks Optional, and only used if bSupportsChannelSettings is set to true. Return PVR_ERROR_NOT_IMPLEMENTED if this add-on won't provide this function.
218 */
219 PVR_ERROR MoveChannel(const PVR_CHANNEL& channel);
220
221 /*!
222 * Show the channel settings dialog, if supported by the backend. 214 * Show the channel settings dialog, if supported by the backend.
223 * @param channel The channel to show the dialog for. 215 * @param channel The channel to show the dialog for.
224 * @return PVR_ERROR_NO_ERROR if the dialog has been displayed successfully. 216 * @return PVR_ERROR_NO_ERROR if the dialog has been displayed successfully.
@@ -246,7 +238,7 @@ extern "C"
246 /*! 238 /*!
247 * @return The total amount of recordings on the backend or -1 on error. 239 * @return The total amount of recordings on the backend or -1 on error.
248 * @param deleted if set return deleted recording (called if bSupportsRecordingsUndelete set to true) 240 * @param deleted if set return deleted recording (called if bSupportsRecordingsUndelete set to true)
249 * @remarks Required if bSupportsRecordings is set to true. Return PVR_ERROR_NOT_IMPLEMENTED if this add-on won't provide this function. 241 * @remarks Required if bSupportsRecordings is set to true. Return -1 if this add-on won't provide this function.
250 */ 242 */
251 int GetRecordingsAmount(bool deleted); 243 int GetRecordingsAmount(bool deleted);
252 244
@@ -427,12 +419,6 @@ extern "C"
427 long long SeekLiveStream(long long iPosition, int iWhence = SEEK_SET); 419 long long SeekLiveStream(long long iPosition, int iWhence = SEEK_SET);
428 420
429 /*! 421 /*!
430 * @return The position in the stream that's currently being read.
431 * @remarks Optional, and only used if bHandlesInputStream is set to true. Return -1 if this add-on won't provide this function.
432 */
433 long long PositionLiveStream(void);
434
435 /*!
436 * @return The total length of the stream that's currently being read. 422 * @return The total length of the stream that's currently being read.
437 * @remarks Optional, and only used if bHandlesInputStream is set to true. Return -1 if this add-on won't provide this function. 423 * @remarks Optional, and only used if bHandlesInputStream is set to true. Return -1 if this add-on won't provide this function.
438 */ 424 */
@@ -520,12 +506,6 @@ extern "C"
520 long long SeekRecordedStream(long long iPosition, int iWhence = SEEK_SET); 506 long long SeekRecordedStream(long long iPosition, int iWhence = SEEK_SET);
521 507
522 /*! 508 /*!
523 * @return The position in the stream that's currently being read.
524 * @remarks Optional, and only used if bSupportsRecordings is set to true. Return -1 if this add-on won't provide this function.
525 */
526 long long PositionRecordedStream(void);
527
528 /*!
529 * @return The total length of the stream that's currently being read. 509 * @return The total length of the stream that's currently being read.
530 * @remarks Optional, and only used if bSupportsRecordings is set to true. Return -1 if this add-on won't provide this function. 510 * @remarks Optional, and only used if bSupportsRecordings is set to true. Return -1 if this add-on won't provide this function.
531 */ 511 */
@@ -606,25 +586,6 @@ extern "C"
606 void SetSpeed(int speed); 586 void SetSpeed(int speed);
607 587
608 /*! 588 /*!
609 * Get actual playing time from addon. With timeshift enabled this is
610 * different to live.
611 * @return time as UTC
612 */
613 time_t GetPlayingTime();
614
615 /*!
616 * Get time of oldest packet in timeshift buffer
617 * @return time as UTC
618 */
619 time_t GetBufferTimeStart();
620
621 /*!
622 * Get time of latest packet in timeshift buffer
623 * @return time as UTC
624 */
625 time_t GetBufferTimeEnd();
626
627 /*!
628 * Get the hostname of the pvr backend server 589 * Get the hostname of the pvr backend server
629 * @return hostname as ip address or alias. If backend does not 590 * @return hostname as ip address or alias. If backend does not
630 * utilize a server, return empty string. 591 * utilize a server, return empty string.
@@ -699,7 +660,6 @@ extern "C"
699 pClient->toAddon.GetChannels = GetChannels; 660 pClient->toAddon.GetChannels = GetChannels;
700 pClient->toAddon.DeleteChannel = DeleteChannel; 661 pClient->toAddon.DeleteChannel = DeleteChannel;
701 pClient->toAddon.RenameChannel = RenameChannel; 662 pClient->toAddon.RenameChannel = RenameChannel;
702 pClient->toAddon.MoveChannel = MoveChannel;
703 pClient->toAddon.OpenDialogChannelSettings = OpenDialogChannelSettings; 663 pClient->toAddon.OpenDialogChannelSettings = OpenDialogChannelSettings;
704 pClient->toAddon.OpenDialogChannelAdd = OpenDialogChannelAdd; 664 pClient->toAddon.OpenDialogChannelAdd = OpenDialogChannelAdd;
705 665
@@ -726,7 +686,6 @@ extern "C"
726 pClient->toAddon.CloseLiveStream = CloseLiveStream; 686 pClient->toAddon.CloseLiveStream = CloseLiveStream;
727 pClient->toAddon.ReadLiveStream = ReadLiveStream; 687 pClient->toAddon.ReadLiveStream = ReadLiveStream;
728 pClient->toAddon.SeekLiveStream = SeekLiveStream; 688 pClient->toAddon.SeekLiveStream = SeekLiveStream;
729 pClient->toAddon.PositionLiveStream = PositionLiveStream;
730 pClient->toAddon.LengthLiveStream = LengthLiveStream; 689 pClient->toAddon.LengthLiveStream = LengthLiveStream;
731 pClient->toAddon.SignalStatus = SignalStatus; 690 pClient->toAddon.SignalStatus = SignalStatus;
732 pClient->toAddon.GetDescrambleInfo = GetDescrambleInfo; 691 pClient->toAddon.GetDescrambleInfo = GetDescrambleInfo;
@@ -742,7 +701,6 @@ extern "C"
742 pClient->toAddon.CloseRecordedStream = CloseRecordedStream; 701 pClient->toAddon.CloseRecordedStream = CloseRecordedStream;
743 pClient->toAddon.ReadRecordedStream = ReadRecordedStream; 702 pClient->toAddon.ReadRecordedStream = ReadRecordedStream;
744 pClient->toAddon.SeekRecordedStream = SeekRecordedStream; 703 pClient->toAddon.SeekRecordedStream = SeekRecordedStream;
745 pClient->toAddon.PositionRecordedStream = PositionRecordedStream;
746 pClient->toAddon.LengthRecordedStream = LengthRecordedStream; 704 pClient->toAddon.LengthRecordedStream = LengthRecordedStream;
747 705
748 pClient->toAddon.DemuxReset = DemuxReset; 706 pClient->toAddon.DemuxReset = DemuxReset;
@@ -750,10 +708,6 @@ extern "C"
750 pClient->toAddon.DemuxFlush = DemuxFlush; 708 pClient->toAddon.DemuxFlush = DemuxFlush;
751 pClient->toAddon.DemuxRead = DemuxRead; 709 pClient->toAddon.DemuxRead = DemuxRead;
752 710
753 pClient->toAddon.GetPlayingTime = GetPlayingTime;
754 pClient->toAddon.GetBufferTimeStart = GetBufferTimeStart;
755 pClient->toAddon.GetBufferTimeEnd = GetBufferTimeEnd;
756
757 pClient->toAddon.GetBackendHostname = GetBackendHostname; 711 pClient->toAddon.GetBackendHostname = GetBackendHostname;
758 712
759 pClient->toAddon.IsTimeshifting = IsTimeshifting; 713 pClient->toAddon.IsTimeshifting = IsTimeshifting;
diff --git a/xbmc/addons/kodi-addon-dev-kit/include/kodi/xbmc_pvr_types.h b/xbmc/addons/kodi-addon-dev-kit/include/kodi/xbmc_pvr_types.h
index a7d21ed..623cb03 100644
--- a/xbmc/addons/kodi-addon-dev-kit/include/kodi/xbmc_pvr_types.h
+++ b/xbmc/addons/kodi-addon-dev-kit/include/kodi/xbmc_pvr_types.h
@@ -40,7 +40,7 @@
40 * and the add-on should set bHandlesDemuxing to true. 40 * and the add-on should set bHandlesDemuxing to true.
41 */ 41 */
42#ifdef USE_DEMUX 42#ifdef USE_DEMUX
43#include "DVDDemuxPacket.h" 43#include "DemuxPacket.h"
44#else 44#else
45struct DemuxPacket; 45struct DemuxPacket;
46#endif 46#endif
@@ -81,6 +81,7 @@ struct DemuxPacket;
81#define PVR_STREAM_MAX_PROPERTIES 20 81#define PVR_STREAM_MAX_PROPERTIES 20
82#define PVR_STREAM_PROPERTY_STREAMURL "streamurl" /*!< @brief the URL of the stream that should be played. */ 82#define PVR_STREAM_PROPERTY_STREAMURL "streamurl" /*!< @brief the URL of the stream that should be played. */
83#define PVR_STREAM_PROPERTY_INPUTSTREAMADDON "inputstreamaddon" /*!< @brief the name of the inputstream add-on that should be used by Kodi to play the stream denoted by PVR_STREAM_PROPERTY_STREAMURL. Leave blank to use Kodi's built-in playing capabilities. */ 83#define PVR_STREAM_PROPERTY_INPUTSTREAMADDON "inputstreamaddon" /*!< @brief the name of the inputstream add-on that should be used by Kodi to play the stream denoted by PVR_STREAM_PROPERTY_STREAMURL. Leave blank to use Kodi's built-in playing capabilities. */
84#define PVR_STREAM_PROPERTY_MIMETYPE "mimetype" /*!< @brief the Mime-Type of the stream that should be played. */
84 85
85/* using the default avformat's MAX_STREAMS value to be safe */ 86/* using the default avformat's MAX_STREAMS value to be safe */
86#define PVR_STREAM_MAX_STREAMS 20 87#define PVR_STREAM_MAX_STREAMS 20
@@ -311,7 +312,7 @@ extern "C" {
311 bool bSupportsTimers; /*!< @brief true if this add-on supports the creation and editing of timers */ 312 bool bSupportsTimers; /*!< @brief true if this add-on supports the creation and editing of timers */
312 bool bSupportsChannelGroups; /*!< @brief true if this add-on supports channel groups */ 313 bool bSupportsChannelGroups; /*!< @brief true if this add-on supports channel groups */
313 bool bSupportsChannelScan; /*!< @brief true if this add-on support scanning for new channels on the backend */ 314 bool bSupportsChannelScan; /*!< @brief true if this add-on support scanning for new channels on the backend */
314 bool bSupportsChannelSettings; /*!< @brief true if this add-on supports the following functions: DeleteChannel, RenameChannel, MoveChannel, DialogChannelSettings and DialogAddChannel */ 315 bool bSupportsChannelSettings; /*!< @brief true if this add-on supports the following functions: DeleteChannel, RenameChannel, DialogChannelSettings and DialogAddChannel */
315 bool bHandlesInputStream; /*!< @brief true if this add-on provides an input stream. false if XBMC handles the stream. */ 316 bool bHandlesInputStream; /*!< @brief true if this add-on provides an input stream. false if XBMC handles the stream. */
316 bool bHandlesDemuxing; /*!< @brief true if this add-on demultiplexes packets. */ 317 bool bHandlesDemuxing; /*!< @brief true if this add-on demultiplexes packets. */
317 bool bSupportsRecordingPlayCount; /*!< @brief true if the backend supports play count for recordings. */ 318 bool bSupportsRecordingPlayCount; /*!< @brief true if the backend supports play count for recordings. */
@@ -423,6 +424,7 @@ extern "C" {
423 char strGroupName[PVR_ADDON_NAME_STRING_LENGTH]; /*!< @brief (required) name of the channel group to add the channel to */ 424 char strGroupName[PVR_ADDON_NAME_STRING_LENGTH]; /*!< @brief (required) name of the channel group to add the channel to */
424 unsigned int iChannelUniqueId; /*!< @brief (required) unique id of the member */ 425 unsigned int iChannelUniqueId; /*!< @brief (required) unique id of the member */
425 unsigned int iChannelNumber; /*!< @brief (optional) channel number within the group */ 426 unsigned int iChannelNumber; /*!< @brief (optional) channel number within the group */
427 unsigned int iSubChannelNumber; /*!< @brief (optional) sub channel number within the group (ATSC) */
426 } ATTRIBUTE_PACKED PVR_CHANNEL_GROUP_MEMBER; 428 } ATTRIBUTE_PACKED PVR_CHANNEL_GROUP_MEMBER;
427 429
428 /*! 430 /*!
@@ -588,14 +590,14 @@ extern "C" {
588 } ATTRIBUTE_PACKED PVR_MENUHOOK_DATA; 590 } ATTRIBUTE_PACKED PVR_MENUHOOK_DATA;
589 591
590 /*! 592 /*!
591 * @brief times of playing stream 593 * @brief times of playing stream (Live TV and recordings)
592 */ 594 */
593 typedef struct PVR_STREAM_TIMES 595 typedef struct PVR_STREAM_TIMES
594 { 596 {
595 time_t startTime; /*!< @brief time (UTC) time elapsed refers to. Ideally start of tv show */ 597 time_t startTime; /*!< @brief For recordings, this must be zero. For Live TV, this is a reference time in units of time_t (UTC) from which time elapsed starts. Ideally start of tv show, but can be any other value. */
596 int64_t ptsStart; /*!< @brief pts of startTime */ 598 int64_t ptsStart; /*!< @brief the pts of startTime */
597 int64_t ptsBegin; /*!< @brief erliest pts player can seek back */ 599 int64_t ptsBegin; /*!< @brief earliest pts player can seek back. Value is seconds, relative to ptsStart. For recordings, this must be zero. For Live TV, this must be zero if not timeshifting and must point to begin of the timeshift buffer, otherwise. */
598 int64_t ptsEnd; /*!< @brief latest pts player can seek forward */ 600 int64_t ptsEnd; /*!< @brief latest pts player can seek forward. Value is seconds, relative to ptsStart. For recordings, this must be the total length in seconds. For Live TV, this must be zero if not timeshifting and must point to end of the timeshift buffer, otherwise. */
599 } ATTRIBUTE_PACKED PVR_STREAM_TIMES; 601 } ATTRIBUTE_PACKED PVR_STREAM_TIMES;
600 602
601 typedef struct AddonToKodiFuncTable_PVR 603 typedef struct AddonToKodiFuncTable_PVR
@@ -676,7 +678,6 @@ extern "C" {
676 void (__cdecl* CloseLiveStream)(void); 678 void (__cdecl* CloseLiveStream)(void);
677 int (__cdecl* ReadLiveStream)(unsigned char*, unsigned int); 679 int (__cdecl* ReadLiveStream)(unsigned char*, unsigned int);
678 long long (__cdecl* SeekLiveStream)(long long, int); 680 long long (__cdecl* SeekLiveStream)(long long, int);
679 long long (__cdecl* PositionLiveStream)(void);
680 long long (__cdecl* LengthLiveStream)(void); 681 long long (__cdecl* LengthLiveStream)(void);
681 PVR_ERROR (__cdecl* SignalStatus)(PVR_SIGNAL_STATUS&); 682 PVR_ERROR (__cdecl* SignalStatus)(PVR_SIGNAL_STATUS&);
682 PVR_ERROR (__cdecl* GetDescrambleInfo)(PVR_DESCRAMBLE_INFO*); 683 PVR_ERROR (__cdecl* GetDescrambleInfo)(PVR_DESCRAMBLE_INFO*);
@@ -686,7 +687,6 @@ extern "C" {
686 void (__cdecl* CloseRecordedStream)(void); 687 void (__cdecl* CloseRecordedStream)(void);
687 int (__cdecl* ReadRecordedStream)(unsigned char*, unsigned int); 688 int (__cdecl* ReadRecordedStream)(unsigned char*, unsigned int);
688 long long (__cdecl* SeekRecordedStream)(long long, int); 689 long long (__cdecl* SeekRecordedStream)(long long, int);
689 long long (__cdecl* PositionRecordedStream)(void);
690 long long (__cdecl* LengthRecordedStream)(void); 690 long long (__cdecl* LengthRecordedStream)(void);
691 void (__cdecl* DemuxReset)(void); 691 void (__cdecl* DemuxReset)(void);
692 void (__cdecl* DemuxAbort)(void); 692 void (__cdecl* DemuxAbort)(void);
@@ -697,9 +697,6 @@ extern "C" {
697 bool (__cdecl* CanSeekStream)(void); 697 bool (__cdecl* CanSeekStream)(void);
698 bool (__cdecl* SeekTime)(double, bool, double*); 698 bool (__cdecl* SeekTime)(double, bool, double*);
699 void (__cdecl* SetSpeed)(int); 699 void (__cdecl* SetSpeed)(int);
700 time_t (__cdecl* GetPlayingTime)(void);
701 time_t (__cdecl* GetBufferTimeStart)(void);
702 time_t (__cdecl* GetBufferTimeEnd)(void);
703 const char* (__cdecl* GetBackendHostname)(void); 700 const char* (__cdecl* GetBackendHostname)(void);
704 bool (__cdecl* IsTimeshifting)(void); 701 bool (__cdecl* IsTimeshifting)(void);
705 bool (__cdecl* IsRealTimeStream)(void); 702 bool (__cdecl* IsRealTimeStream)(void);