From 3cb8aa05f8cee9e860cf83531682ff0ed4af6a4f Mon Sep 17 00:00:00 2001 From: manuel Date: Thu, 4 Mar 2021 23:36:40 +0100 Subject: sync with upstream --- .../kodi/c-api/addon-instance/CMakeLists.txt | 2 + .../kodi/c-api/addon-instance/audio_decoder.h | 2 - .../kodi/c-api/addon-instance/audio_encoder.h | 2 - .../include/kodi/c-api/addon-instance/game.h | 2 - .../kodi/c-api/addon-instance/image_decoder.h | 2 - .../kodi/c-api/addon-instance/inputstream.h | 703 +++++++++++++++++++++ .../addon-instance/inputstream/CMakeLists.txt | 9 + .../addon-instance/inputstream/demux_packet.h | 117 ++++ .../addon-instance/inputstream/stream_codec.h | 131 ++++ .../addon-instance/inputstream/stream_constants.h | 49 ++ .../addon-instance/inputstream/stream_crypto.h | 129 ++++ .../addon-instance/inputstream/timing_constants.h | 42 ++ .../include/kodi/c-api/addon-instance/peripheral.h | 2 - .../include/kodi/c-api/addon-instance/pvr.h | 14 +- .../c-api/addon-instance/pvr/pvr_channel_groups.h | 2 - .../kodi/c-api/addon-instance/pvr/pvr_channels.h | 2 - .../kodi/c-api/addon-instance/pvr/pvr_defines.h | 2 - .../kodi/c-api/addon-instance/pvr/pvr_edl.h | 2 - .../kodi/c-api/addon-instance/pvr/pvr_epg.h | 2 - .../kodi/c-api/addon-instance/pvr/pvr_general.h | 9 +- .../kodi/c-api/addon-instance/pvr/pvr_menu_hook.h | 2 - .../kodi/c-api/addon-instance/pvr/pvr_recordings.h | 2 - .../kodi/c-api/addon-instance/pvr/pvr_stream.h | 9 +- .../kodi/c-api/addon-instance/pvr/pvr_timers.h | 2 - .../kodi/c-api/addon-instance/screensaver.h | 5 +- .../include/kodi/c-api/addon-instance/vfs.h | 4 +- .../kodi/c-api/addon-instance/video_codec.h | 261 ++++++++ .../kodi/c-api/addon-instance/visualization.h | 5 +- .../kodi-dev-kit/include/kodi/c-api/addon_base.h | 43 +- .../kodi-dev-kit/include/kodi/c-api/audio_engine.h | 2 - .../kodi-dev-kit/include/kodi/c-api/filesystem.h | 15 +- .../kodi-dev-kit/include/kodi/c-api/general.h | 2 - .../include/kodi/c-api/gui/controls/button.h | 2 - .../include/kodi/c-api/gui/controls/edit.h | 2 - .../include/kodi/c-api/gui/controls/fade_label.h | 2 - .../include/kodi/c-api/gui/controls/image.h | 2 - .../include/kodi/c-api/gui/controls/label.h | 2 - .../include/kodi/c-api/gui/controls/progress.h | 2 - .../include/kodi/c-api/gui/controls/radio_button.h | 2 - .../include/kodi/c-api/gui/controls/rendering.h | 2 - .../kodi/c-api/gui/controls/settings_slider.h | 2 - .../include/kodi/c-api/gui/controls/slider.h | 2 - .../include/kodi/c-api/gui/controls/spin.h | 2 - .../include/kodi/c-api/gui/controls/text_box.h | 2 - .../include/kodi/c-api/gui/definitions.h | 2 - .../include/kodi/c-api/gui/dialogs/context_menu.h | 2 - .../kodi/c-api/gui/dialogs/extended_progress.h | 2 - .../include/kodi/c-api/gui/dialogs/filebrowser.h | 2 - .../include/kodi/c-api/gui/dialogs/keyboard.h | 2 - .../include/kodi/c-api/gui/dialogs/numeric.h | 2 - .../include/kodi/c-api/gui/dialogs/ok.h | 2 - .../include/kodi/c-api/gui/dialogs/progress.h | 2 - .../include/kodi/c-api/gui/dialogs/select.h | 2 - .../include/kodi/c-api/gui/dialogs/text_viewer.h | 2 - .../include/kodi/c-api/gui/dialogs/yes_no.h | 2 - .../kodi-dev-kit/include/kodi/c-api/gui/general.h | 2 - .../include/kodi/c-api/gui/input/action_ids.h | 2 - .../include/kodi/c-api/gui/list_item.h | 2 - .../kodi-dev-kit/include/kodi/c-api/gui/window.h | 2 - .../kodi-dev-kit/include/kodi/c-api/network.h | 2 - .../include/kodi/c-api/platform/android/system.h | 2 - 61 files changed, 1499 insertions(+), 136 deletions(-) create mode 100644 xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/inputstream.h create mode 100644 xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/inputstream/CMakeLists.txt create mode 100644 xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/inputstream/demux_packet.h create mode 100644 xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/inputstream/stream_codec.h create mode 100644 xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/inputstream/stream_constants.h create mode 100644 xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/inputstream/stream_crypto.h create mode 100644 xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/inputstream/timing_constants.h create mode 100644 xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/video_codec.h (limited to 'xbmc/addons/kodi-dev-kit/include/kodi/c-api') 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 audio_encoder.h game.h image_decoder.h + inputstream.h peripheral.h pvr.h screensaver.h vfs.h + video_codec.h visualization.h) if(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 @@ * See LICENSES/README.md for more information. */ -#pragma once - #ifndef C_API_ADDONINSTANCE_AUDIO_DECODER_H #define C_API_ADDONINSTANCE_AUDIO_DECODER_H 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 @@ * See LICENSES/README.md for more information. */ -#pragma once - #ifndef C_API_ADDONINSTANCE_AUDIO_ENCODER_H #define C_API_ADDONINSTANCE_AUDIO_ENCODER_H 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 @@ * See LICENSES/README.md for more information. */ -#pragma once - #ifndef C_API_ADDONINSTANCE_GAME_H #define C_API_ADDONINSTANCE_GAME_H 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 @@ * See LICENSES/README.md for more information. */ -#pragma once - #ifndef C_API_ADDONINSTANCE_IMAGE_DECODER_H #define C_API_ADDONINSTANCE_IMAGE_DECODER_H 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 @@ +/* + * Copyright (C) 2005-2018 Team Kodi + * This file is part of Kodi - https://kodi.tv + * + * SPDX-License-Identifier: GPL-2.0-or-later + * See LICENSES/README.md for more information. + */ + +#ifndef C_API_ADDONINSTANCE_INPUTSTREAM_H +#define C_API_ADDONINSTANCE_INPUTSTREAM_H + +#include "../addon_base.h" +#include "inputstream/demux_packet.h" +#include "inputstream/stream_codec.h" +#include "inputstream/stream_constants.h" +#include "inputstream/stream_crypto.h" +#include "inputstream/timing_constants.h" + +#include + +// Increment this level always if you add features which can lead to compile failures in the addon +#define INPUTSTREAM_VERSION_LEVEL 4 + +#define INPUTSTREAM_MAX_INFO_COUNT 8 +#define INPUTSTREAM_MAX_STREAM_COUNT 256 +#define INPUTSTREAM_MAX_STRING_NAME_SIZE 256 +#define INPUTSTREAM_MAX_STRING_CODEC_SIZE 32 +#define INPUTSTREAM_MAX_STRING_LANGUAGE_SIZE 64 + +#ifdef __cplusplus +extern "C" +{ +#endif /* __cplusplus */ + + //============================================================================== + /// @ingroup cpp_kodi_addon_inputstream_Defs_Interface_InputstreamCapabilities + /// @brief **Capability types of inputstream addon.**\n + /// This values are needed to tell Kodi which options are supported on the addon. + /// + /// If one of this is defined, then the corresponding methods from + /// @ref cpp_kodi_addon_inputstream "kodi::addon::CInstanceInputStream" need + /// to be implemented. + /// + /// Used on @ref kodi::addon::CInstanceInputStream::GetCapabilities(). + /// + ///@{ + enum INPUTSTREAM_MASKTYPE + { + /// @brief **0000 0000 0000 0001 :** Supports interface demuxing. + /// + /// If set must be @ref cpp_kodi_addon_inputstream_Demux "Demux support" included. + INPUTSTREAM_SUPPORTS_IDEMUX = (1 << 0), + + /// @brief **0000 0000 0000 0010 :** Supports interface position time. + /// + /// This means that the start time and the current stream time are used. + /// + /// If set must be @ref cpp_kodi_addon_inputstream_Time "Time support" included. + INPUTSTREAM_SUPPORTS_IPOSTIME = (1 << 1), + + /// @brief **0000 0000 0000 0100 :** Supports interface for display time. + /// + /// This will call up the complete stream time information. The start time + /// and the individual PTS times are then given using @ref cpp_kodi_addon_inputstream_Defs_Times. + /// + /// If set must be @ref cpp_kodi_addon_inputstream_Times "Times support" included. + INPUTSTREAM_SUPPORTS_IDISPLAYTIME = (1 << 2), + + /// @brief **0000 0000 0000 1000 :** Supports seek + INPUTSTREAM_SUPPORTS_SEEK = (1 << 3), + + /// @brief **0000 0000 0001 0000 :** Supports pause + INPUTSTREAM_SUPPORTS_PAUSE = (1 << 4), + + /// @brief **0000 0000 0010 0000 :** Supports interface to give position time. + /// + /// This will only ask for the current time of the stream, not for length or + /// start. + /// + /// If set must be @ref cpp_kodi_addon_inputstream_PosTime "Position time support" included. + INPUTSTREAM_SUPPORTS_ITIME = (1 << 5), + + /// @brief **0000 0000 0100 0000 :** Supports interface for chapter selection. + /// + /// If set must be @ref cpp_kodi_addon_inputstream_Chapter "Chapter support" included. + INPUTSTREAM_SUPPORTS_ICHAPTER = (1 << 6), + }; + ///@} + //---------------------------------------------------------------------------- + + /*! + * @brief InputStream add-on capabilities. All capabilities are set to "false" as default. + */ + struct INPUTSTREAM_CAPABILITIES + { + /// set of supported capabilities + uint32_t m_mask; + }; + + /*! + * @brief structure of key/value pairs passed to addon on Open() + */ + struct INPUTSTREAM_PROPERTY + { + const char* m_strURL; + const char* m_mimeType; + + unsigned int m_nCountInfoValues; + struct LISTITEMPROPERTY + { + const char* m_strKey; + const char* m_strValue; + } m_ListItemProperties[STREAM_MAX_PROPERTY_COUNT]; + + const char* m_libFolder; + const char* m_profileFolder; + }; + + /*! + * @brief Array of stream IDs + */ + struct INPUTSTREAM_IDS + { + unsigned int m_streamCount; + unsigned int m_streamIds[INPUTSTREAM_MAX_STREAM_COUNT]; + }; + + /*! + * @brief MASTERING Metadata + */ + struct INPUTSTREAM_MASTERING_METADATA + { + double primary_r_chromaticity_x; + double primary_r_chromaticity_y; + double primary_g_chromaticity_x; + double primary_g_chromaticity_y; + double primary_b_chromaticity_x; + double primary_b_chromaticity_y; + double white_point_chromaticity_x; + double white_point_chromaticity_y; + double luminance_max; + double luminance_min; + }; + + /*! + * @brief CONTENTLIGHT Metadata + */ + struct INPUTSTREAM_CONTENTLIGHT_METADATA + { + uint64_t max_cll; + uint64_t max_fall; + }; + + //============================================================================== + /// @defgroup cpp_kodi_addon_inputstream_Defs_Interface_INPUTSTREAM_TYPE enum INPUTSTREAM_TYPE + /// @ingroup cpp_kodi_addon_inputstream_Defs_Interface + /// @brief **Inputstream types**\n + /// To identify type on stream. + /// + /// Used on @ref kodi::addon::InputstreamInfo::SetStreamType and @ref kodi::addon::InputstreamInfo::GetStreamType. + /// + ///@{ + enum INPUTSTREAM_TYPE + { + /// @brief **0 :** To set nothing defined + INPUTSTREAM_TYPE_NONE = 0, + + /// @brief **1 :** To identify @ref cpp_kodi_addon_inputstream_Defs_Info as Video + INPUTSTREAM_TYPE_VIDEO, + + /// @brief **2 :** To identify @ref cpp_kodi_addon_inputstream_Defs_Info as Audio + INPUTSTREAM_TYPE_AUDIO, + + /// @brief **3 :** To identify @ref cpp_kodi_addon_inputstream_Defs_Info as Subtitle + INPUTSTREAM_TYPE_SUBTITLE, + + /// @brief **4 :** To identify @ref cpp_kodi_addon_inputstream_Defs_Info as Teletext + INPUTSTREAM_TYPE_TELETEXT, + + /// @brief **5 :** To identify @ref cpp_kodi_addon_inputstream_Defs_Info as Radio RDS + INPUTSTREAM_TYPE_RDS, + }; + ///@} + //------------------------------------------------------------------------------ + + //============================================================================== + /// @defgroup cpp_kodi_addon_inputstream_Defs_Interface_INPUTSTREAM_CODEC_FEATURES enum INPUTSTREAM_CODEC_FEATURES + /// @ingroup cpp_kodi_addon_inputstream_Defs_Interface + /// @brief **Inputstream codec features**\n + /// To identify special extra features used for optional codec on inputstream. + /// + /// Used on @ref kodi::addon::InputstreamInfo::SetFeatures and @ref kodi::addon::InputstreamInfo::GetFeatures. + /// + /// @note These variables are bit flags which are created using "|" can be used together. + /// + ///@{ + enum INPUTSTREAM_CODEC_FEATURES + { + /// @brief **0000 0000 0000 0000 :** Empty to set if nothing is used + INPUTSTREAM_FEATURE_NONE = 0, + + /// @brief **0000 0000 0000 0001 :** To set addon decode should used with @ref cpp_kodi_addon_videocodec. + INPUTSTREAM_FEATURE_DECODE = (1 << 0) + }; + ///@} + //---------------------------------------------------------------------------- + + //============================================================================ + /// @defgroup cpp_kodi_addon_inputstream_Defs_Interface_INPUTSTREAM_FLAGS enum INPUTSTREAM_FLAGS + /// @ingroup cpp_kodi_addon_inputstream_Defs_Interface + /// @brief **Inputstream flags**\n + /// To identify extra stream flags used on inputstream. + /// + /// Used on @ref kodi::addon::InputstreamInfo::SetFlags and @ref kodi::addon::InputstreamInfo::GetFlags. + /// + /// @note These variables are bit flags which are created using "|" can be used together. + /// + ///@{ + enum INPUTSTREAM_FLAGS + { + /// @brief **0000 0000 0000 0000 :** Empty to set if nothing is used + INPUTSTREAM_FLAG_NONE = 0, + + /// @brief **0000 0000 0000 0001 :** Default + INPUTSTREAM_FLAG_DEFAULT = (1 << 0), + + /// @brief **0000 0000 0000 0010 :** Dub + INPUTSTREAM_FLAG_DUB = (1 << 1), + + /// @brief **0000 0000 0000 0100 :** Original + INPUTSTREAM_FLAG_ORIGINAL = (1 << 2), + + /// @brief **0000 0000 0000 1000 :** Comment + INPUTSTREAM_FLAG_COMMENT = (1 << 3), + + /// @brief **0000 0000 0001 0000 :** Lyrics + INPUTSTREAM_FLAG_LYRICS = (1 << 4), + + /// @brief **0000 0000 0010 0000 :** Karaoke + INPUTSTREAM_FLAG_KARAOKE = (1 << 5), + + /// @brief **0000 0000 0100 0000 :** Forced + INPUTSTREAM_FLAG_FORCED = (1 << 6), + + /// @brief **0000 0000 1000 0000 :** Hearing impaired + INPUTSTREAM_FLAG_HEARING_IMPAIRED = (1 << 7), + + /// @brief **0000 0001 0000 0000 :** Visual impaired + INPUTSTREAM_FLAG_VISUAL_IMPAIRED = (1 << 8), + }; + ///@} + //---------------------------------------------------------------------------- + + // Keep in sync with AVColorSpace + //============================================================================ + /// @defgroup cpp_kodi_addon_inputstream_Defs_Interface_INPUTSTREAM_COLORSPACE enum INPUTSTREAM_COLORSPACE + /// @ingroup cpp_kodi_addon_inputstream_Defs_Interface + /// @brief **Inputstream color space flags**\n + /// YUV colorspace type. These values match the ones defined by ISO/IEC 23001-8_2013 § 7.3. + /// + /// Used on @ref kodi::addon::InputstreamInfo::SetColorSpace and @ref kodi::addon::InputstreamInfo::GetColorSpace. + /// + ///@{ + enum INPUTSTREAM_COLORSPACE + { + /// @brief **0 :** Order of coefficients is actually GBR, also IEC 61966-2-1 (sRGB) + INPUTSTREAM_COLORSPACE_RGB = 0, + + /// @brief **1 :** Also ITU-R BT1361 / IEC 61966-2-4 xvYCC709 / SMPTE RP177 Annex B + INPUTSTREAM_COLORSPACE_BT709 = 1, + + /// @brief **2 :** To set stream is unspecified + INPUTSTREAM_COLORSPACE_UNSPECIFIED = 2, + + /// @brief **2 :** To set stream is unkown + /// @note Same as @ref INPUTSTREAM_COLORSPACE_UNSPECIFIED + INPUTSTREAM_COLORSPACE_UNKNOWN = INPUTSTREAM_COLORSPACE_UNSPECIFIED, // compatibility + + /// @brief **3 :** To set colorspace reserved + INPUTSTREAM_COLORSPACE_RESERVED = 3, + + /// @brief **4 :** FCC Title 47 Code of Federal Regulations 73.682 (a)(20) + INPUTSTREAM_COLORSPACE_FCC = 4, + + /// @brief **5 :** Also ITU-R BT601-6 625 / ITU-R BT1358 625 / ITU-R BT1700 625 PAL & SECAM / IEC 61966-2-4 xvYCC601 + INPUTSTREAM_COLORSPACE_BT470BG = 5, + + /// @brief **6 :** Also ITU-R BT601-6 525 / ITU-R BT1358 525 / ITU-R BT1700 NTSC + INPUTSTREAM_COLORSPACE_SMPTE170M = 6, + + /// @brief **7 :** Functionally identical to above @ref INPUTSTREAM_COLORSPACE_SMPTE170M + INPUTSTREAM_COLORSPACE_SMPTE240M = 7, + + /// @brief **8 :** Used by Dirac / VC-2 and H.264 FRext, see ITU-T SG16 + INPUTSTREAM_COLORSPACE_YCGCO = 8, + + /// @brief **8 :** To set colorspace as YCOCG + /// @note Same as @ref INPUTSTREAM_COLORSPACE_YCGCO + INPUTSTREAM_COLORSPACE_YCOCG = INPUTSTREAM_COLORSPACE_YCGCO, + + /// @brief **9 :** ITU-R BT2020 non-constant luminance system + INPUTSTREAM_COLORSPACE_BT2020_NCL = 9, + + /// @brief **10 :** ITU-R BT2020 constant luminance system + INPUTSTREAM_COLORSPACE_BT2020_CL = 10, + + /// @brief **11 :** SMPTE 2085, Y'D'zD'x + INPUTSTREAM_COLORSPACE_SMPTE2085 = 11, + + /// @brief **12 :** Chromaticity-derived non-constant luminance system + INPUTSTREAM_COLORSPACE_CHROMA_DERIVED_NCL = 12, + + /// @brief **13 :** Chromaticity-derived constant luminance system + INPUTSTREAM_COLORSPACE_CHROMA_DERIVED_CL = 13, + + /// @brief **14 :** ITU-R BT.2100-0, ICtCp + INPUTSTREAM_COLORSPACE_ICTCP = 14, + + /// @brief The maximum value to use in a list. + INPUTSTREAM_COLORSPACE_MAX + }; + ///@} + //------------------------------------------------------------------------------ + + // Keep in sync with AVColorPrimaries + //============================================================================== + /// @defgroup cpp_kodi_addon_inputstream_Defs_Interface_INPUTSTREAM_COLORPRIMARIES enum INPUTSTREAM_COLORPRIMARIES + /// @ingroup cpp_kodi_addon_inputstream_Defs_Interface + /// @brief **Inputstream color primaries flags**\n + /// Chromaticity coordinates of the source primaries. These values match the ones defined by ISO/IEC 23001-8_2013 § 7.1. + /// + /// Used on @ref kodi::addon::InputstreamInfo::SetColorPrimaries and @ref kodi::addon::InputstreamInfo::GetColorPrimaries. + /// + ///@{ + enum INPUTSTREAM_COLORPRIMARIES + { + /// @brief **0 :** Reserved + INPUTSTREAM_COLORPRIMARY_RESERVED0 = 0, + + /// @brief **1 :** Also ITU-R BT1361 / IEC 61966-2-4 / SMPTE RP177 Annex B + INPUTSTREAM_COLORPRIMARY_BT709 = 1, + + /// @brief **2 :** Unspecified + INPUTSTREAM_COLORPRIMARY_UNSPECIFIED = 2, + + /// @brief **3 :** Reserved + INPUTSTREAM_COLORPRIMARY_RESERVED = 3, + + /// @brief **4 :** Also FCC Title 47 Code of Federal Regulations 73.682 (a)(20) + INPUTSTREAM_COLORPRIMARY_BT470M = 4, + + /// @brief **5 :** Also ITU-R BT601-6 625 / ITU-R BT1358 625 / ITU-R BT1700 625 PAL & SECAM + INPUTSTREAM_COLORPRIMARY_BT470BG = 5, + + /// @brief **6 :** Also ITU-R BT601-6 525 / ITU-R BT1358 525 / ITU-R BT1700 NTSC + INPUTSTREAM_COLORPRIMARY_SMPTE170M = 6, + + /// @brief **7 :** Functionally identical to above + INPUTSTREAM_COLORPRIMARY_SMPTE240M = 7, + + /// @brief **8 :** Colour filters using Illuminant C + INPUTSTREAM_COLORPRIMARY_FILM = 8, + + /// @brief **9 :** ITU-R BT2020 + INPUTSTREAM_COLORPRIMARY_BT2020 = 9, + + /// @brief **10 :** SMPTE ST 428-1 (CIE 1931 XYZ) + INPUTSTREAM_COLORPRIMARY_SMPTE428 = 10, + + /// @brief **10 :** + /// @note Same as @ref INPUTSTREAM_COLORPRIMARY_SMPTE428 + INPUTSTREAM_COLORPRIMARY_SMPTEST428_1 = INPUTSTREAM_COLORPRIMARY_SMPTE428, + + /// @brief **11 :** SMPTE ST 431-2 (2011) / DCI P3 + INPUTSTREAM_COLORPRIMARY_SMPTE431 = 11, + + /// @brief **12 :** SMPTE ST 432-1 (2010) / P3 D65 / Display P3 + INPUTSTREAM_COLORPRIMARY_SMPTE432 = 12, + + /// @brief **22 :** JEDEC P22 phosphors + INPUTSTREAM_COLORPRIMARY_JEDEC_P22 = 22, + + /// @brief The maximum value to use in a list. + INPUTSTREAM_COLORPRIMARY_MAX + }; + ///@} + //------------------------------------------------------------------------------ + + // Keep in sync with AVColorRange + //============================================================================== + /// @defgroup cpp_kodi_addon_inputstream_Defs_Interface_INPUTSTREAM_COLORRANGE enum INPUTSTREAM_COLORRANGE + /// @ingroup cpp_kodi_addon_inputstream_Defs_Interface + /// @brief **Inputstream color range flags**\n + /// MPEG vs JPEG YUV range. + /// + /// Used on @ref kodi::addon::InputstreamInfo::SetColorRange and @ref kodi::addon::InputstreamInfo::GetColorRange. + /// + ///@{ + enum INPUTSTREAM_COLORRANGE + { + /// @brief **0 :** To define as unkown + INPUTSTREAM_COLORRANGE_UNKNOWN = 0, + + /// @brief **1 :** The normal 219*2^(n-8) "MPEG" YUV ranges + INPUTSTREAM_COLORRANGE_LIMITED, + + /// @brief **2 :** The normal 2^n-1 "JPEG" YUV ranges + INPUTSTREAM_COLORRANGE_FULLRANGE, + + /// @brief The maximum value to use in a list. + INPUTSTREAM_COLORRANGE_MAX + }; + ///@} + //------------------------------------------------------------------------------ + + // keep in sync with AVColorTransferCharacteristic + //============================================================================== + /// @defgroup cpp_kodi_addon_inputstream_Defs_Interface_INPUTSTREAM_COLORTRC enum INPUTSTREAM_COLORTRC + /// @ingroup cpp_kodi_addon_inputstream_Defs_Interface + /// @brief **Inputstream color TRC flags**\n + /// Color Transfer Characteristic. These values match the ones defined by ISO/IEC 23001-8_2013 § 7.2. + /// + /// Used on @ref kodi::addon::InputstreamInfo::SetColorTransferCharacteristic and @ref kodi::addon::InputstreamInfo::GetColorTransferCharacteristic. + /// + ///@{ + enum INPUTSTREAM_COLORTRC + { + /// @brief **0 :** Reserved + INPUTSTREAM_COLORTRC_RESERVED0 = 0, + + /// @brief **1 :** Also ITU-R BT1361 + INPUTSTREAM_COLORTRC_BT709 = 1, + + /// @brief **2 :** Unspecified + INPUTSTREAM_COLORTRC_UNSPECIFIED = 2, + + /// @brief **3 :** Reserved + INPUTSTREAM_COLORTRC_RESERVED = 3, + + /// @brief **4 :** Also ITU-R BT470M / ITU-R BT1700 625 PAL & SECAM + INPUTSTREAM_COLORTRC_GAMMA22 = 4, + + /// @brief **5 :** Also ITU-R BT470BG + INPUTSTREAM_COLORTRC_GAMMA28 = 5, + + /// @brief **6 :** Also ITU-R BT601-6 525 or 625 / ITU-R BT1358 525 or 625 / ITU-R BT1700 NTSC + INPUTSTREAM_COLORTRC_SMPTE170M = 6, + + /// @brief **7 :** Functionally identical to above @ref INPUTSTREAM_COLORTRC_SMPTE170M + INPUTSTREAM_COLORTRC_SMPTE240M = 7, + + /// @brief **8 :** Linear transfer characteristics + INPUTSTREAM_COLORTRC_LINEAR = 8, + + /// @brief **9 :** Logarithmic transfer characteristic (100:1 range) + INPUTSTREAM_COLORTRC_LOG = 9, + + /// @brief **10 :** Logarithmic transfer characteristic (100 * Sqrt(10) : 1 range) + INPUTSTREAM_COLORTRC_LOG_SQRT = 10, + + /// @brief **11 :** IEC 61966-2-4 + INPUTSTREAM_COLORTRC_IEC61966_2_4 = 11, + + /// @brief **12 :** ITU-R BT1361 Extended Colour Gamut + INPUTSTREAM_COLORTRC_BT1361_ECG = 12, + + /// @brief **13 :** IEC 61966-2-1 (sRGB or sYCC) + INPUTSTREAM_COLORTRC_IEC61966_2_1 = 13, + + /// @brief **14 :** ITU-R BT2020 for 10-bit system + INPUTSTREAM_COLORTRC_BT2020_10 = 14, + + /// @brief **15 :** ITU-R BT2020 for 12-bit system + INPUTSTREAM_COLORTRC_BT2020_12 = 15, + + /// @brief **16 :** SMPTE ST 2084 for 10-, 12-, 14- and 16-bit systems + INPUTSTREAM_COLORTRC_SMPTE2084 = 16, + + /// @brief **16 :** Same as @ref INPUTSTREAM_COLORTRC_SMPTE2084 + INPUTSTREAM_COLORTRC_SMPTEST2084 = INPUTSTREAM_COLORTRC_SMPTE2084, + + /// @brief **17 :** SMPTE ST 428-1 + INPUTSTREAM_COLORTRC_SMPTE428 = 17, + + /// @brief **17 :** Same as @ref INPUTSTREAM_COLORTRC_SMPTE428 + INPUTSTREAM_COLORTRC_SMPTEST428_1 = INPUTSTREAM_COLORTRC_SMPTE428, + + /// @brief **18 :** ARIB STD-B67, known as "Hybrid log-gamma" + INPUTSTREAM_COLORTRC_ARIB_STD_B67 = 18, + + /// @brief The maximum value to use in a list. + INPUTSTREAM_COLORTRC_MAX + }; + ///@} + //------------------------------------------------------------------------------ + + /*! + * @brief stream properties + */ + struct INPUTSTREAM_INFO + { + enum INPUTSTREAM_TYPE m_streamType; + uint32_t m_features; + uint32_t m_flags; + + //! @brief (optional) name of the stream, \0 for default handling + char m_name[INPUTSTREAM_MAX_STRING_NAME_SIZE]; + + //! @brief (required) name of codec according to ffmpeg + char m_codecName[INPUTSTREAM_MAX_STRING_CODEC_SIZE]; + + //! @brief (optional) internal name of codec (selectionstream info) + char m_codecInternalName[INPUTSTREAM_MAX_STRING_CODEC_SIZE]; + + //! @brief (optional) the profile of the codec + enum STREAMCODEC_PROFILE m_codecProfile; + + //! @brief (required) physical index + unsigned int m_pID; + + const uint8_t* m_ExtraData; + unsigned int m_ExtraSize; + + //! @brief RFC 5646 language code (empty string if undefined) + char m_language[INPUTSTREAM_MAX_STRING_LANGUAGE_SIZE]; + + //! Video stream related data + //@{ + + //! @brief Scale of 1000 and a rate of 29970 will result in 29.97 fps + unsigned int m_FpsScale; + + unsigned int m_FpsRate; + + //! @brief height of the stream reported by the demuxer + unsigned int m_Height; + + //! @brief width of the stream reported by the demuxer + unsigned int m_Width; + + //! @brief display aspect of stream + float m_Aspect; + + //@} + + //! Audio stream related data + //@{ + + //! @brief (required) amount of channels + unsigned int m_Channels; + + //! @brief (required) sample rate + unsigned int m_SampleRate; + + //! @brief (required) bit rate + unsigned int m_BitRate; + + //! @brief (required) bits per sample + unsigned int m_BitsPerSample; + + unsigned int m_BlockAlign; + + //@} + + struct STREAM_CRYPTO_SESSION m_cryptoSession; + + // new in API version 2.0.8 + //@{ + //! @brief Codec If available, the fourcc code codec + unsigned int m_codecFourCC; + + //! @brief definition of colorspace + enum INPUTSTREAM_COLORSPACE m_colorSpace; + + //! @brief color range if available + enum INPUTSTREAM_COLORRANGE m_colorRange; + //@} + + //new in API 2.0.9 / INPUTSTREAM_VERSION_LEVEL 1 + //@{ + enum INPUTSTREAM_COLORPRIMARIES m_colorPrimaries; + enum INPUTSTREAM_COLORTRC m_colorTransferCharacteristic; + //@} + + //! @brief mastering static Metadata + struct INPUTSTREAM_MASTERING_METADATA* m_masteringMetadata; + + //! @brief content light static Metadata + struct INPUTSTREAM_CONTENTLIGHT_METADATA* m_contentLightMetadata; + }; + + struct INPUTSTREAM_TIMES + { + time_t startTime; + double ptsStart; + double ptsBegin; + double ptsEnd; + }; + + /*! + * @brief "C" ABI Structures to transfer the methods from this to Kodi + */ + + // this are properties given to the addon on create + // at this time we have no parameters for the addon + typedef struct AddonProps_InputStream /* internal */ + { + int dummy; + } AddonProps_InputStream; + + typedef struct AddonToKodiFuncTable_InputStream /* internal */ + { + KODI_HANDLE kodiInstance; + struct DEMUX_PACKET* (*allocate_demux_packet)(void* kodiInstance, int data_size); + struct DEMUX_PACKET* (*allocate_encrypted_demux_packet)(void* kodiInstance, + unsigned int data_size, + unsigned int encrypted_subsample_count); + void (*free_demux_packet)(void* kodiInstance, struct DEMUX_PACKET* packet); + } AddonToKodiFuncTable_InputStream; + + struct AddonInstance_InputStream; + typedef struct KodiToAddonFuncTable_InputStream /* internal */ + { + KODI_HANDLE addonInstance; + + bool(__cdecl* open)(const struct AddonInstance_InputStream* instance, + struct INPUTSTREAM_PROPERTY* props); + void(__cdecl* close)(const struct AddonInstance_InputStream* instance); + const char*(__cdecl* get_path_list)(const struct AddonInstance_InputStream* instance); + void(__cdecl* get_capabilities)(const struct AddonInstance_InputStream* instance, + struct INPUTSTREAM_CAPABILITIES* capabilities); + + // IDemux + bool(__cdecl* get_stream_ids)(const struct AddonInstance_InputStream* instance, + struct INPUTSTREAM_IDS* ids); + bool(__cdecl* get_stream)(const struct AddonInstance_InputStream* instance, + int streamid, + struct INPUTSTREAM_INFO* info, + KODI_HANDLE* demuxStream, + KODI_HANDLE (*transfer_stream)(KODI_HANDLE handle, + int streamId, + struct INPUTSTREAM_INFO* stream)); + void(__cdecl* enable_stream)(const struct AddonInstance_InputStream* instance, + int streamid, + bool enable); + bool(__cdecl* open_stream)(const struct AddonInstance_InputStream* instance, int streamid); + void(__cdecl* demux_reset)(const struct AddonInstance_InputStream* instance); + void(__cdecl* demux_abort)(const struct AddonInstance_InputStream* instance); + void(__cdecl* demux_flush)(const struct AddonInstance_InputStream* instance); + struct DEMUX_PACKET*(__cdecl* demux_read)(const struct AddonInstance_InputStream* instance); + bool(__cdecl* demux_seek_time)(const struct AddonInstance_InputStream* instance, + double time, + bool backwards, + double* startpts); + void(__cdecl* demux_set_speed)(const struct AddonInstance_InputStream* instance, int speed); + void(__cdecl* set_video_resolution)(const struct AddonInstance_InputStream* instance, + int width, + int height); + + // IDisplayTime + int(__cdecl* get_total_time)(const struct AddonInstance_InputStream* instance); + int(__cdecl* get_time)(const struct AddonInstance_InputStream* instance); + + // ITime + bool(__cdecl* get_times)(const struct AddonInstance_InputStream* instance, + struct INPUTSTREAM_TIMES* times); + + // IPosTime + bool(__cdecl* pos_time)(const struct AddonInstance_InputStream* instance, int ms); + + int(__cdecl* read_stream)(const struct AddonInstance_InputStream* instance, + uint8_t* buffer, + unsigned int bufferSize); + int64_t(__cdecl* seek_stream)(const struct AddonInstance_InputStream* instance, + int64_t position, + int whence); + int64_t(__cdecl* position_stream)(const struct AddonInstance_InputStream* instance); + int64_t(__cdecl* length_stream)(const struct AddonInstance_InputStream* instance); + bool(__cdecl* is_real_time_stream)(const struct AddonInstance_InputStream* instance); + + // IChapter + int(__cdecl* get_chapter)(const struct AddonInstance_InputStream* instance); + int(__cdecl* get_chapter_count)(const struct AddonInstance_InputStream* instance); + const char*(__cdecl* get_chapter_name)(const struct AddonInstance_InputStream* instance, + int ch); + int64_t(__cdecl* get_chapter_pos)(const struct AddonInstance_InputStream* instance, int ch); + bool(__cdecl* seek_chapter)(const struct AddonInstance_InputStream* instance, int ch); + + int(__cdecl* block_size_stream)(const struct AddonInstance_InputStream* instance); + } KodiToAddonFuncTable_InputStream; + + typedef struct AddonInstance_InputStream /* internal */ + { + struct AddonProps_InputStream* props; + struct AddonToKodiFuncTable_InputStream* toKodi; + struct KodiToAddonFuncTable_InputStream* toAddon; + } AddonInstance_InputStream; + +#ifdef __cplusplus +} /* extern "C" */ +#endif /* __cplusplus */ + +#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 @@ +set(HEADERS demux_packet.h + stream_codec.h + stream_constants.h + stream_crypto.h + timing_constants.h) + +if(NOT ENABLE_STATIC_LIBS) + core_add_library(addons_kodi-dev-kit_include_kodi_c-api_addon-instance_inputstream) +endif() 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 @@ +/* + * Copyright (C) 2005-2020 Team Kodi + * This file is part of Kodi - https://kodi.tv + * + * SPDX-License-Identifier: GPL-2.0-or-later + * See LICENSES/README.md for more information. + */ + +#ifndef C_API_ADDONINSTANCE_INPUTSTREAM_DEMUXPACKET_H +#define C_API_ADDONINSTANCE_INPUTSTREAM_DEMUXPACKET_H + +#include "timing_constants.h" + +#include +#include + +#define DEMUX_SPECIALID_STREAMINFO -10 +#define DEMUX_SPECIALID_STREAMCHANGE -11 + +#ifdef __cplusplus +extern "C" +{ +#endif /* __cplusplus */ + + struct DEMUX_CRYPTO_INFO; + + //============================================================================ + /// @defgroup cpp_kodi_addon_inputstream_Defs_Interface_DEMUX_PACKET struct DEMUX_PACKET + /// @ingroup cpp_kodi_addon_inputstream_Defs_Interface + /// @brief **Demux packet**\n + /// To processed codec and demux inputstream stream. + /// + /// This part is in the "C" style in order to have better performance and + /// possibly to be used in "C" libraries. + /// + /// The structure should be created with @ref kodi::addon::CInstanceInputStream::AllocateDemuxPacket() + /// or @ref kodi::addon::CInstanceInputStream::AllocateEncryptedDemuxPacket() + /// and if not added to Kodi with @ref kodi::addon::CInstanceInputStream::FreeDemuxPacket() + /// be deleted again. + /// + /// Packages that have been given to Kodi and processed will then be deleted + /// by him. + /// + ///@{ + struct DEMUX_PACKET + { + /// @brief Stream package which is given for decoding. + /// + /// @note Associated storage from here is created using + /// @ref kodi::addon::CInstanceInputStream::AllocateDemuxPacket() + /// or @ref kodi::addon::CInstanceInputStream::AllocateEncryptedDemuxPacket(). + uint8_t* pData; + + /// @brief Size of the package given at @ref pData. + int iSize; + + /// @brief Identification of the stream. + int iStreamId; + + /// @brief Identification of the associated demuxer, this can be identical + /// on several streams. + int64_t demuxerId; + + /// @brief The group this data belongs to, used to group data from different + /// streams together. + int iGroupId; + + //------------------------------------------ + + /// @brief Additional packet data that can be provided by the container. + /// + /// Packet can contain several types of side information. + /// + /// This is usually based on that of ffmpeg, see + /// [AVPacketSideData](https://ffmpeg.org/doxygen/trunk/structAVPacketSideData.html). + void* pSideData; + + /// @brief Data elements stored at @ref pSideData. + int iSideDataElems; + + //------------------------------------------ + + /// @brief Presentation time stamp (PTS). + double pts; + + /// @brief Decoding time stamp (DTS). + double dts; + + /// @brief Duration in @ref STREAM_TIME_BASE if available + double duration; + + /// @brief Display time from input stream + int dispTime; + + /// @brief To show that this package allows recreating the presentation by + /// mistake. + bool recoveryPoint; + + //------------------------------------------ + + /// @brief Optional data to allow decryption at processing site if + /// necessary. + /// + /// This can be created using @ref kodi::addon::CInstanceInputStream::AllocateEncryptedDemuxPacket(), + /// otherwise this is declared as `nullptr`. + /// + /// See @ref DEMUX_CRYPTO_INFO for their style. + struct DEMUX_CRYPTO_INFO* cryptoInfo; + }; + ///@} + //---------------------------------------------------------------------------- + +#ifdef __cplusplus +} /* extern "C" */ +#endif /* __cplusplus */ + +#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 @@ +/* + * Copyright (C) 2017-2018 Team Kodi + * This file is part of Kodi - https://kodi.tv + * + * SPDX-License-Identifier: GPL-2.0-or-later + * See LICENSES/README.md for more information. + */ + +#ifndef C_API_ADDONINSTANCE_INPUTSTREAM_STREAMCODEC_H +#define C_API_ADDONINSTANCE_INPUTSTREAM_STREAMCODEC_H + +#ifdef __cplusplus +extern "C" +{ +#endif /* __cplusplus */ + + //============================================================================== + /// @defgroup cpp_kodi_addon_inputstream_Defs_StreamEncryption_STREAMCODEC_PROFILE enum STREAMCODEC_PROFILE + /// @ingroup cpp_kodi_addon_inputstream_Defs_StreamCodec + /// @brief **The standard defines several sets of capabilities.**\n + /// Which are referred to as profiles, targeting specific classes of applications. + /// + ///@{ + enum STREAMCODEC_PROFILE + { + /// @brief Unknown codec profile + CodecProfileUnknown = 0, + + /// @brief If a codec profile is not required + CodecProfileNotNeeded, + + /// @brief **H264** Baseline Profile (BP, 66)\n + /// \n + /// Primarily for low-cost applications that require additional data loss + /// robustness, this profile is used in some videoconferencing and mobile + /// applications. This profile includes all features that are supported + /// in the Constrained Baseline Profile, plus three additional features + /// that can be used for loss robustness (or for other purposes such as + /// low-delay multi-point video stream compositing). The importance of + /// this profile has faded somewhat since the definition of the Constrained + /// Baseline Profile in 2009. All Constrained Baseline Profile bitstreams + /// are also considered to be Baseline Profile bitstreams, as these two + /// profiles share the same profile identifier code value. + H264CodecProfileBaseline, + + /// @brief **H264** Main Profile (MP, 77)\n + /// \n + /// This profile is used for standard-definition digital TV broadcasts that + /// use the MPEG-4 format as defined in the + /// [DVB standard](http://www.etsi.org/deliver/etsi_ts/101100_101199/101154/01.09.01_60/ts_101154v010901p.pdf). + /// It is not, however, used for high-definition television broadcasts, as the + /// importance of this profile faded when the High Profile was developed + /// in 2004 for that application. + H264CodecProfileMain, + + /// @brief **H264** Extended Profile (XP, 88)\n + /// \n + /// Intended as the streaming video profile, this profile has relatively high + /// compression capability and some extra tricks for robustness to data losses + /// and server stream switching. + H264CodecProfileExtended, + + /// @brief **H264** High Profile (HiP, 100)\n + /// \n + /// The primary profile for broadcast and disc storage applications, + /// particularly for high-definition television applications (for example, + /// this is the profile adopted by the [Blu-ray Disc](https://en.wikipedia.org/wiki/Blu-ray_Disc) + /// storage format and the [DVB](https://en.wikipedia.org/wiki/Digital_Video_Broadcasting) + /// HDTV broadcast service). + H264CodecProfileHigh, + + /// @brief **H264** High 10 Profile (Hi10P, 110)\n + /// \n + /// Going beyond typical mainstream consumer product capabilities, this + /// profile builds on top of the High Profile, adding support for up to 10 + /// bits per sample of decoded picture precision. + H264CodecProfileHigh10, + + /// @brief **H264** High 4:2:2 Profile (Hi422P, 122)\n + /// \n + /// Primarily targeting professional applications that use interlaced video, + /// this profile builds on top of the High 10 Profile, adding support for the + /// 4:2:2 chroma sampling format while using up to 10 bits per sample of + /// decoded picture precision. + H264CodecProfileHigh422, + + /// @brief **H264** High 4:4:4 Predictive Profile (Hi444PP, 244)\n + /// \n + /// This profile builds on top of the High 4:2:2 Profile, supporting up to + /// 4:4:4 chroma sampling, up to 14 bits per sample, and additionally + /// supporting efficient lossless region coding and the coding of each + /// picture as three separate color planes. + H264CodecProfileHigh444Predictive, + + /// @brief **VP9** profile 0\n + /// \n + /// There are several variants of the VP9 format (known as "coding profiles"), + /// which successively allow more features; profile 0 is the basic variant, + /// requiring the least from a hardware implementation. + /// + /// [Color depth](https://en.wikipedia.org/wiki/Color_depth): 8 bit/sample, + /// [chroma subsampling](https://en.wikipedia.org/wiki/Chroma_subsampling): 4:2:0 + VP9CodecProfile0 = 20, + + /// @brief **VP9** profile 1\n + /// \n + /// [Color depth](https://en.wikipedia.org/wiki/Color_depth): 8 bit, + /// [chroma subsampling](https://en.wikipedia.org/wiki/Chroma_subsampling): 4:2:0, 4:2:2, 4:4:4 + VP9CodecProfile1, + + /// @brief **VP9** profile 2\n + /// \n + /// [Color depth](https://en.wikipedia.org/wiki/Color_depth): 10–12 bit, + /// [chroma subsampling](https://en.wikipedia.org/wiki/Chroma_subsampling): 4:2:0 + VP9CodecProfile2, + + /// @brief **VP9** profile 3\n + /// \n + /// [Color depth](https://en.wikipedia.org/wiki/Color_depth): 10–12 bit, + /// [chroma subsampling](https://en.wikipedia.org/wiki/Chroma_subsampling): 4:2:0, 4:2:2, 4:4:4, + /// see [VP9 Bitstream & Decoding Process Specification](https://storage.googleapis.com/downloads.webmproject.org/docs/vp9/vp9-bitstream-specification-v0.6-20160331-draft.pdf) + VP9CodecProfile3, + }; + ///@} + //------------------------------------------------------------------------------ + +#ifdef __cplusplus +} /* extern "C" */ +#endif /* __cplusplus */ + +#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 @@ +/* + * Copyright (C) 2017-2020 Team Kodi + * This file is part of Kodi - https://kodi.tv + * + * SPDX-License-Identifier: GPL-2.0-or-later + * See LICENSES/README.md for more information. + */ + +#ifndef C_API_ADDONINSTANCE_INPUTSTREAM_STREAMCONSTANTS_H +#define C_API_ADDONINSTANCE_INPUTSTREAM_STREAMCONSTANTS_H + +/// @ingroup cpp_kodi_addon_inputstream_Defs_StreamConstants +/// @brief The name of the inputstream add-on that should be used by Kodi to +/// play the stream. +/// +/// Leave blank to use Kodi's built-in playing capabilities or to allow +/// ffmpeg to handle directly set to @ref STREAM_PROPERTY_VALUE_INPUTSTREAMFFMPEG. +#define STREAM_PROPERTY_INPUTSTREAM "inputstream" + +/// @ingroup cpp_kodi_addon_inputstream_Defs_StreamConstants +/// @brief Identification string for an input stream. +/// +/// This value can be used in addition to @ref STREAM_PROPERTY_INPUTSTREAM. It is +/// used to provide the respective inpustream addon with additional +/// identification. +/// +/// The difference between this and other stream properties is that it is also +/// passed in the associated @ref kodi::addon::CAddonBase::CreateInstance call. +/// +/// This makes it possible to select different processing classes within the +/// associated add-on. +#define STREAM_PROPERTY_INPUTSTREAM_INSTANCE_ID "inputstream-instance-id" + +/// @ingroup cpp_kodi_addon_inputstream_Defs_StreamConstants +/// @brief "true" to denote that the stream that should be played is a +/// realtime stream. Any other value indicates that this is not a realtime +/// stream. +#define STREAM_PROPERTY_ISREALTIMESTREAM "isrealtimestream" + +/// @ingroup cpp_kodi_addon_inputstream_Defs_StreamConstants +/// @brief Special value for @ref STREAM_PROPERTY_INPUTSTREAM to use +/// ffmpeg to directly play a stream URL. +#define STREAM_PROPERTY_VALUE_INPUTSTREAMFFMPEG "inputstream.ffmpeg" + +/// @ingroup cpp_kodi_addon_inputstream_Defs_StreamConstants +/// @brief Max number of properties that can be sent to an Inputstream addon +#define STREAM_MAX_PROPERTY_COUNT 30 + +#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 @@ +/* + * Copyright (C) 2017-2018 Team Kodi + * This file is part of Kodi - https://kodi.tv + * + * SPDX-License-Identifier: GPL-2.0-or-later + * See LICENSES/README.md for more information. + */ + +#ifndef C_API_ADDONINSTANCE_INPUTSTREAM_STREAMCRYPTO_H +#define C_API_ADDONINSTANCE_INPUTSTREAM_STREAMCRYPTO_H + +#include +#include + +#define STREAMCRYPTO_VERSION_LEVEL 2 + +#ifdef __cplusplus +extern "C" +{ +#endif /* __cplusplus */ + + //============================================================================ + /// @defgroup cpp_kodi_addon_inputstream_Defs_StreamEncryption_STREAM_CRYPTO_KEY_SYSTEM enum STREAM_CRYPTO_KEY_SYSTEM + /// @ingroup cpp_kodi_addon_inputstream_Defs_StreamEncryption + /// @brief **Available ways to process stream cryptography**\n + /// For @ref cpp_kodi_addon_inputstream_Defs_StreamEncryption_StreamCryptoSession, + /// this defines the used and required auxiliary modules which are required to + /// process the encryption stream. + /// + /// Used to set wanted [digital rights management](https://en.wikipedia.org/wiki/Digital_rights_management) + /// (DRM) technology provider for stream. + ///@{ + enum STREAM_CRYPTO_KEY_SYSTEM + { + /// @brief **0** - If no path is to be used, this is the default + STREAM_CRYPTO_KEY_SYSTEM_NONE = 0, + + /// @brief **1** - To use [Widevine](https://en.wikipedia.org/wiki/Widevine) for processing + STREAM_CRYPTO_KEY_SYSTEM_WIDEVINE, + + /// @brief **2** - To use [Playready](https://en.wikipedia.org/wiki/PlayReady) for processing + STREAM_CRYPTO_KEY_SYSTEM_PLAYREADY, + + /// @brief **3** - To use Wiseplay for processing + STREAM_CRYPTO_KEY_SYSTEM_WISEPLAY, + + /// @brief **4** - The maximum value to use in a list. + STREAM_CRYPTO_KEY_SYSTEM_COUNT + }; + ///@} + //---------------------------------------------------------------------------- + + //============================================================================ + /// @defgroup cpp_kodi_addon_inputstream_Defs_StreamEncryption_STREAM_CRYPTO_FLAGS enum STREAM_CRYPTO_FLAGS + /// @ingroup cpp_kodi_addon_inputstream_Defs_StreamEncryption + /// @brief **Cryptography flags to use special conditions**\n + /// To identify special extra conditions. + /// + /// @note These variables are bit flags which are created using "|" can be used + /// together. + /// + ///@{ + enum STREAM_CRYPTO_FLAGS + { + /// @brief **0000 0000** - Empty to set if nothing is used. + STREAM_CRYPTO_FLAG_NONE = 0, + + /// @brief **0000 0001** - Is set in flags if decoding has to be done in + /// [trusted execution environment (TEE)](https://en.wikipedia.org/wiki/Trusted_execution_environment). + STREAM_CRYPTO_FLAG_SECURE_DECODER = (1 << 0) + }; + ///@} + //---------------------------------------------------------------------------- + + //============================================================================ + /// @defgroup cpp_kodi_addon_inputstream_Defs_StreamEncryption_DEMUX_CRYPTO_INFO struct DEMUX_CRYPTO_INFO + /// @ingroup cpp_kodi_addon_inputstream_Defs_StreamEncryption + /// @brief **C data structure for processing encrypted streams.**\n + /// If required, this structure is used for every DEMUX_PACKET to be processed. + /// + ///@{ + struct DEMUX_CRYPTO_INFO + { + /// @brief Number of subsamples. + uint16_t numSubSamples; + + /// @brief Flags for later use. + uint16_t flags; + + /// @brief @ref numSubSamples uint16_t's wich define the size of clear size + /// of a subsample. + uint16_t* clearBytes; + + /// @brief @ref numSubSamples uint32_t's wich define the size of cipher size + /// of a subsample. + uint32_t* cipherBytes; + + /// @brief Initialization vector + uint8_t iv[16]; + + /// @brief Key id + uint8_t kid[16]; + }; + ///@} + //---------------------------------------------------------------------------- + + // Data to manage stream cryptography + struct STREAM_CRYPTO_SESSION + { + // keysystem for encrypted media, STREAM_CRYPTO_KEY_SYSTEM_NONE for unencrypted + // media. + // + // See STREAM_CRYPTO_KEY_SYSTEM for available options. + enum STREAM_CRYPTO_KEY_SYSTEM keySystem; + + // Flags to use special conditions, see STREAM_CRYPTO_FLAGS for available flags. + uint8_t flags; + + // The crypto session key id. + char sessionId[256]; + }; + ///@} + //---------------------------------------------------------------------------- + +#ifdef __cplusplus +} /* extern "C" */ +#endif /* __cplusplus */ + +#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 @@ +/* + * Copyright (C) 2015-2020 Team Kodi + * This file is part of Kodi - https://kodi.tv + * + * SPDX-License-Identifier: GPL-2.0-or-later + * See LICENSES/README.md for more information. + */ + +#ifndef C_API_ADDONINSTANCE_INPUTSTREAM_TIMINGCONSTANTS_H +#define C_API_ADDONINSTANCE_INPUTSTREAM_TIMINGCONSTANTS_H + +/// @ingroup cpp_kodi_addon_inputstream_Defs_TimingConstants +/// @brief Speed value to pause stream in playback. +/// +#define STREAM_PLAYSPEED_PAUSE 0 // frame stepping + +/// @ingroup cpp_kodi_addon_inputstream_Defs_TimingConstants +/// @brief Speed value to perform stream playback at normal speed. +/// +/// See @ref STREAM_PLAYSPEED_PAUSE for pause of stream. +/// +#define STREAM_PLAYSPEED_NORMAL 1000 + +/// @ingroup cpp_kodi_addon_inputstream_Defs_TimingConstants +/// @brief Time base represented as integer. +/// +#define STREAM_TIME_BASE 1000000 + +/// @ingroup cpp_kodi_addon_inputstream_Defs_TimingConstants +/// @brief Undefined timestamp value. +/// +/// Usually reported by demuxer that work on containers that do not provide +/// either pts or dts. +/// +#define STREAM_NOPTS_VALUE 0xFFF0000000000000 + +// "C" defines to translate stream times +#define STREAM_TIME_TO_MSEC(x) ((int)((double)(x)*1000 / STREAM_TIME_BASE)) +#define STREAM_SEC_TO_TIME(x) ((double)(x)*STREAM_TIME_BASE) +#define STREAM_MSEC_TO_TIME(x) ((double)(x)*STREAM_TIME_BASE / 1000) + +#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 @@ * See LICENSES/README.md for more information. */ -#pragma once - #ifndef C_API_ADDONINSTANCE_PERIPHERAL_H #define C_API_ADDONINSTANCE_PERIPHERAL_H 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 @@ * See LICENSES/README.md for more information. */ -#pragma once - #ifndef C_API_ADDONINSTANCE_PVR_H #define C_API_ADDONINSTANCE_PVR_H @@ -67,7 +65,8 @@ extern "C" { const char* strUserPath; const char* strClientPath; - int iEpgMaxDays; + int iEpgMaxFutureDays; + int iEpgMaxPastDays; } AddonProperties_PVR; /*! @@ -124,8 +123,8 @@ extern "C" //--==----==----==----==----==----==----==----==----==----==----==----==----== // Stream demux interface functions - void (*FreeDemuxPacket)(void* kodiInstance, struct DemuxPacket* pPacket); - struct DemuxPacket* (*AllocateDemuxPacket)(void* kodiInstance, int iDataSize); + void (*FreeDemuxPacket)(void* kodiInstance, struct DEMUX_PACKET* pPacket); + struct DEMUX_PACKET* (*AllocateDemuxPacket)(void* kodiInstance, int iDataSize); struct PVR_CODEC (*GetCodecByName)(const void* kodiInstance, const char* strCodecName); //--==----==----==----==----==----==----==----==----==----==----==----==----== @@ -210,7 +209,8 @@ extern "C" const struct EPG_TAG*, struct PVR_NAMED_VALUE*, unsigned int*); - enum PVR_ERROR(__cdecl* SetEPGTimeFrame)(const struct AddonInstance_PVR*, int); + enum PVR_ERROR(__cdecl* SetEPGMaxPastDays)(const struct AddonInstance_PVR*, int); + enum PVR_ERROR(__cdecl* SetEPGMaxFutureDays)(const struct AddonInstance_PVR*, int); enum PVR_ERROR(__cdecl* CallEPGMenuHook)(const struct AddonInstance_PVR*, const struct PVR_MENUHOOK*, const struct EPG_TAG*); @@ -295,7 +295,7 @@ extern "C" // Stream demux interface functions enum PVR_ERROR(__cdecl* GetStreamProperties)(const struct AddonInstance_PVR*, struct PVR_STREAM_PROPERTIES*); - struct DemuxPacket*(__cdecl* DemuxRead)(const struct AddonInstance_PVR*); + struct DEMUX_PACKET*(__cdecl* DemuxRead)(const struct AddonInstance_PVR*); void(__cdecl* DemuxReset)(const struct AddonInstance_PVR*); void(__cdecl* DemuxAbort)(const struct AddonInstance_PVR*); 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 @@ * See LICENSES/README.md for more information. */ -#pragma once - #ifndef C_API_ADDONINSTANCE_PVR_CHANNEL_GROUPS_H #define C_API_ADDONINSTANCE_PVR_CHANNEL_GROUPS_H 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 @@ * See LICENSES/README.md for more information. */ -#pragma once - #ifndef C_API_ADDONINSTANCE_PVR_CHANNELS_H #define C_API_ADDONINSTANCE_PVR_CHANNELS_H 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 @@ * See LICENSES/README.md for more information. */ -#pragma once - #ifndef C_API_ADDONINSTANCE_PVR_DEFINES_H #define C_API_ADDONINSTANCE_PVR_DEFINES_H 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 @@ * See LICENSES/README.md for more information. */ -#pragma once - #ifndef C_API_ADDONINSTANCE_PVR_EDL_H #define C_API_ADDONINSTANCE_PVR_EDL_H 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 @@ * See LICENSES/README.md for more information. */ -#pragma once - #ifndef C_API_ADDONINSTANCE_PVR_EPG_H #define C_API_ADDONINSTANCE_PVR_EPG_H 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 @@ * See LICENSES/README.md for more information. */ -#pragma once - #ifndef C_API_ADDONINSTANCE_PVR_GENERAL_H #define C_API_ADDONINSTANCE_PVR_GENERAL_H +#include "../inputstream/stream_constants.h" #include "pvr_defines.h" -#ifdef BUILD_KODI_ADDON -#include "../../../InputStreamConstants.h" -#else -#include "cores/VideoPlayer/Interface/Addon/InputStreamConstants.h" -#endif - #include //¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ 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 @@ * See LICENSES/README.md for more information. */ -#pragma once - #ifndef C_API_ADDONINSTANCE_PVR_MENUHOOK_H #define C_API_ADDONINSTANCE_PVR_MENUHOOK_H 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 @@ * See LICENSES/README.md for more information. */ -#pragma once - #ifndef C_API_ADDONINSTANCE_PVR_RECORDINGS_H #define C_API_ADDONINSTANCE_PVR_RECORDINGS_H 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 @@ * See LICENSES/README.md for more information. */ -#pragma once - #ifndef C_API_ADDONINSTANCE_PVR_STREAM_H #define C_API_ADDONINSTANCE_PVR_STREAM_H +#include "../inputstream/demux_packet.h" #include "pvr_defines.h" -#ifdef BUILD_KODI_ADDON -#include "../../../DemuxPacket.h" -#else -#include "cores/VideoPlayer/Interface/Addon/DemuxPacket.h" -#endif - #include #include 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 @@ * See LICENSES/README.md for more information. */ -#pragma once - #ifndef C_API_ADDONINSTANCE_PVR_TIMERS_H #define C_API_ADDONINSTANCE_PVR_TIMERS_H 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 @@ * See LICENSES/README.md for more information. */ -#pragma once +#ifndef C_API_ADDONINSTANCE_SCREENSAVER_H +#define C_API_ADDONINSTANCE_SCREENSAVER_H #include "../addon_base.h" @@ -73,3 +74,5 @@ extern "C" #ifdef __cplusplus } /* extern "C" */ #endif /* __cplusplus */ + +#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 @@ * See LICENSES/README.md for more information. */ -#pragma once - #ifndef C_API_ADDONINSTANCE_VFS_H #define C_API_ADDONINSTANCE_VFS_H @@ -94,7 +92,7 @@ extern "C" VFS_FILE_HANDLE context); bool(__cdecl* io_control_get_cache_status)(const struct AddonInstance_VFSEntry* instance, VFS_FILE_HANDLE context, - VFS_CACHE_STATUS_DATA* status); + struct VFS_CACHE_STATUS_DATA* status); bool(__cdecl* io_control_set_cache_rate)(const struct AddonInstance_VFSEntry* instance, VFS_FILE_HANDLE context, 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 @@ +/* + * Copyright (C) 2017-2018 Team Kodi + * This file is part of Kodi - https://kodi.tv + * + * SPDX-License-Identifier: GPL-2.0-or-later + * See LICENSES/README.md for more information. + */ + +#ifndef C_API_ADDONINSTANCE_VIDEOCODEC_H +#define C_API_ADDONINSTANCE_VIDEOCODEC_H + +#include "../addon_base.h" +#include "inputstream/demux_packet.h" +#include "inputstream/stream_codec.h" +#include "inputstream/stream_crypto.h" + +#ifdef __cplusplus +extern "C" +{ +#endif /* __cplusplus */ + + //============================================================================ + /// @ingroup cpp_kodi_addon_videocodec_Defs + /// @brief Return values used by video decoder interface + enum VIDEOCODEC_RETVAL + { + /// @brief Noop + VC_NONE = 0, + + /// @brief An error occured, no other messages will be returned + VC_ERROR, + + /// @brief The decoder needs more data + VC_BUFFER, + + /// @brief The decoder got a picture + VC_PICTURE, + + /// @brief The decoder signals EOF + VC_EOF, + }; + //---------------------------------------------------------------------------- + + //============================================================================ + /// @ingroup cpp_kodi_addon_videocodec_Defs_VideoCodecInitdata + /// @brief The video stream representations requested by Kodi + /// + enum VIDEOCODEC_FORMAT + { + /// @brief Unknown types, this is used to declare the end of a list of + /// requested types + VIDEOCODEC_FORMAT_UNKNOWN = 0, + + /// @brief YV12 4:2:0 YCrCb planar format + VIDEOCODEC_FORMAT_YV12, + + /// @brief These formats are identical to YV12 except that the U and V plane + /// order is reversed. + VIDEOCODEC_FORMAT_I420, + + /// @brief The maximum value to use in a list. + VIDEOCODEC_FORMAT_MAXFORMATS + }; + //---------------------------------------------------------------------------- + + //============================================================================ + /// @ingroup cpp_kodi_addon_videocodec_Defs_VideoCodecInitdata + /// @brief Video codec types that can be requested from Kodi + /// + enum VIDEOCODEC_TYPE + { + /// @brief Unknown or other type requested + /// + VIDEOCODEC_UNKNOWN = 0, + + /// @brief [VP8](https://en.wikipedia.org/wiki/VP8) video coding format + /// + VIDEOCODEC_VP8, + + /// @brief [Advanced Video Coding (AVC)](https://en.wikipedia.org/wiki/Advanced_Video_Coding), + /// also referred to as H.264 or [MPEG-4](https://en.wikipedia.org/wiki/MPEG-4) + /// Part 10, Advanced Video Coding (MPEG-4 AVC). + VIDEOCODEC_H264, + + /// @brief [VP9](https://en.wikipedia.org/wiki/VP9) video coding format\n + /// \n + /// VP9 is the successor to VP8 and competes mainly with MPEG's + /// [High Efficiency Video Coding](https://en.wikipedia.org/wiki/High_Efficiency_Video_Coding) + /// (HEVC/H.265). + VIDEOCODEC_VP9 + }; + //---------------------------------------------------------------------------- + + //============================================================================ + /// @ingroup cpp_kodi_addon_videocodec_Defs_VIDEOCODEC_PICTURE + /// @brief YUV Plane identification pointers + /// + /// YUV is a color encoding system typically used as part of a color image pipeline. + /// + /// These are used to access stored data in @ref VIDEOCODEC_PICTURE::planeOffsets + /// and @ref VIDEOCODEC_PICTURE::stride. + /// + enum VIDEOCODEC_PLANE + { + /// @brief "luminance" component Y (equivalent to grey scale) + VIDEOCODEC_PICTURE_Y_PLANE = 0, + + /// @brief "chrominance" component U (blue projection) + VIDEOCODEC_PICTURE_U_PLANE, + + /// @brief "chrominance" component V (red projection) + VIDEOCODEC_PICTURE_V_PLANE, + + /// @brief The maximum value to use in a list. + VIDEOCODEC_PICTURE_MAXPLANES = 3, + }; + //---------------------------------------------------------------------------- + + //============================================================================ + /// @ingroup cpp_kodi_addon_videocodec_Defs_VIDEOCODEC_PICTURE + /// @brief Video coded process flags, used to perform special operations in + /// stream calls. + /// + /// These are used to access stored data in @ref VIDEOCODEC_PICTURE::flags. + /// + /// @note These variables are bit flags which are created using "|" can be used together. + /// + enum VIDEOCODEC_PICTURE_FLAG + { + /// @brief Empty and nothing defined + VIDEOCODEC_PICTURE_FLAG_NONE = 0, + + /// @brief Drop in decoder + VIDEOCODEC_PICTURE_FLAG_DROP = (1 << 0), + + /// @brief Squeeze out pictured without feeding new packets + VIDEOCODEC_PICTURE_FLAG_DRAIN = (1 << 1), + }; + //---------------------------------------------------------------------------- + + //============================================================================ + /// @defgroup cpp_kodi_addon_videocodec_Defs_VIDEOCODEC_PICTURE struct VIDEOCODEC_PICTURE + /// @ingroup cpp_kodi_addon_videocodec_Defs + /// @brief Data structure which is given to the addon when a decoding call is made. + /// + ///@{ + struct VIDEOCODEC_PICTURE + { + /// @brief The video format declared with @ref VIDEOCODEC_FORMAT and to be + /// used on the addon. + enum VIDEOCODEC_FORMAT videoFormat; + + /// @brief Video coded process flags, used to perform special operations in + /// stream calls. + /// + /// Possible flags are declared here @ref VIDEOCODEC_PICTURE_FLAGS. + uint32_t flags; + + /// @brief Picture width. + uint32_t width; + + /// @brief Picture height. + uint32_t height; + + /// @brief Data to be decoded in the addon. + uint8_t* decodedData; + + /// @brief Size of the data given with @ref decodedData + size_t decodedDataSize; + + /// @brief YUV color plane calculation array. + /// + /// This includes the three values of the YUV and can be identified using + /// @ref VIDEOCODEC_PLANE. + uint32_t planeOffsets[VIDEOCODEC_PICTURE_MAXPLANES]; + + /// @brief YUV color stride calculation array + /// + /// This includes the three values of the YUV and can be identified using + /// @ref VIDEOCODEC_PLANE. + uint32_t stride[VIDEOCODEC_PICTURE_MAXPLANES]; + + /// @brief Picture presentation time stamp (PTS). + int64_t pts; + + /// @brief This is used to save the related handle from Kodi. + /// + /// To handle the input stream buffer, this is given by Kodi using + /// @ref kodi::addon::CInstanceVideoCodec::GetFrameBuffer and must be + /// released again using @ref kodi::addon::CInstanceVideoCodec::ReleaseFrameBuffer. + KODI_HANDLE videoBufferHandle; + }; + ///@} + //---------------------------------------------------------------------------- + + struct VIDEOCODEC_INITDATA + { + enum VIDEOCODEC_TYPE codec; + enum STREAMCODEC_PROFILE codecProfile; + enum VIDEOCODEC_FORMAT* videoFormats; + uint32_t width; + uint32_t height; + const uint8_t* extraData; + unsigned int extraDataSize; + struct STREAM_CRYPTO_SESSION cryptoSession; + }; + + // this are properties given to the addon on create + // at this time we have no parameters for the addon + typedef struct AddonProps_VideoCodec + { + int dummy; + } AddonProps_VideoCodec; + + struct AddonInstance_VideoCodec; + typedef struct KodiToAddonFuncTable_VideoCodec + { + KODI_HANDLE addonInstance; + + //! @brief Opens a codec + bool(__cdecl* open)(const struct AddonInstance_VideoCodec* instance, + struct VIDEOCODEC_INITDATA* initData); + + //! @brief Reconfigures a codec + bool(__cdecl* reconfigure)(const struct AddonInstance_VideoCodec* instance, + struct VIDEOCODEC_INITDATA* initData); + + //! @brief Feed codec if requested from GetPicture() (return VC_BUFFER) + bool(__cdecl* add_data)(const struct AddonInstance_VideoCodec* instance, + const struct DEMUX_PACKET* packet); + + //! @brief Get a decoded picture / request new data + enum VIDEOCODEC_RETVAL(__cdecl* get_picture)(const struct AddonInstance_VideoCodec* instance, + struct VIDEOCODEC_PICTURE* picture); + + //! @brief Get the name of this video decoder + const char*(__cdecl* get_name)(const struct AddonInstance_VideoCodec* instance); + + //! @brief Reset the codec + void(__cdecl* reset)(const struct AddonInstance_VideoCodec* instance); + } KodiToAddonFuncTable_VideoCodec; + + typedef struct AddonToKodiFuncTable_VideoCodec + { + KODI_HANDLE kodiInstance; + bool (*get_frame_buffer)(void* kodiInstance, struct VIDEOCODEC_PICTURE* picture); + void (*release_frame_buffer)(void* kodiInstance, void* buffer); + } AddonToKodiFuncTable_VideoCodec; + + typedef struct AddonInstance_VideoCodec + { + struct AddonProps_VideoCodec* props; + struct AddonToKodiFuncTable_VideoCodec* toKodi; + struct KodiToAddonFuncTable_VideoCodec* toAddon; + } AddonInstance_VideoCodec; + +#ifdef __cplusplus +} /* extern "C" */ +#endif /* __cplusplus */ + +#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 @@ * See LICENSES/README.md for more information. */ -#pragma once +#ifndef C_API_ADDONINSTANCE_VISUALIZATION_H +#define C_API_ADDONINSTANCE_VISUALIZATION_H #include "../addon_base.h" @@ -115,3 +116,5 @@ extern "C" #ifdef __cplusplus } /* extern "C" */ #endif /* __cplusplus */ + +#endif /* !C_API_ADDONINSTANCE_VISUALIZATION_H */ diff --git a/xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon_base.h b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon_base.h index faa99fa..1153eca 100644 --- a/xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon_base.h +++ b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon_base.h @@ -6,8 +6,6 @@ * See LICENSES/README.md for more information. */ -#pragma once - #ifndef C_API_ADDON_BASE_H #define C_API_ADDON_BASE_H @@ -27,6 +25,8 @@ #endif #endif +// Generic helper definitions for smallest possible alignment +//@{ #undef ATTRIBUTE_PACKED #undef PRAGMA_PACK_BEGIN #undef PRAGMA_PACK_END @@ -34,18 +34,16 @@ #if defined(__GNUC__) #define ATTRIBUTE_PACKED __attribute__((packed)) #define PRAGMA_PACK 0 -#define ATTRIBUTE_HIDDEN __attribute__((visibility("hidden"))) #endif #if !defined(ATTRIBUTE_PACKED) #define ATTRIBUTE_PACKED #define PRAGMA_PACK 1 #endif +//@} -#if !defined(ATTRIBUTE_HIDDEN) -#define ATTRIBUTE_HIDDEN -#endif - +// Generic helper definitions for inline function support +//@{ #ifdef _MSC_VER #define ATTRIBUTE_FORCEINLINE __forceinline #elif defined(__GNUC__) @@ -59,6 +57,27 @@ #else #define ATTRIBUTE_FORCEINLINE inline #endif +//@} + +// Generic helper definitions for shared library support +//@{ +#if defined _WIN32 || defined __CYGWIN__ +#define ATTRIBUTE_DLL_IMPORT __declspec(dllimport) +#define ATTRIBUTE_DLL_EXPORT __declspec(dllexport) +#define ATTRIBUTE_DLL_LOCAL +#else +#if __GNUC__ >= 4 +#define ATTRIBUTE_DLL_IMPORT __attribute__ ((visibility ("default"))) +#define ATTRIBUTE_DLL_EXPORT __attribute__ ((visibility ("default"))) +#define ATTRIBUTE_DLL_LOCAL __attribute__ ((visibility ("hidden"))) +#else +#define ATTRIBUTE_DLL_IMPORT +#define ATTRIBUTE_DLL_EXPORT +#define ATTRIBUTE_DLL_LOCAL +#endif +#endif +#define ATTRIBUTE_HIDDEN ATTRIBUTE_DLL_LOCAL // Fallback to old +//@} // Hardware specific device context interface #define ADDON_HARDWARE_CONTEXT void* @@ -75,9 +94,11 @@ extern "C" #endif /* __cplusplus */ //============================================================================ - /// @ingroup cpp_kodi_addon_addonbase - /// @brief Return value of functions in @ref cpp_kodi_addon_addonbase "kodi::addon::CAddonBase" - /// and associated classes. + /// @ingroup cpp_kodi_addon_addonbase_Defs + /// @defgroup cpp_kodi_addon_addonbase_Defs_ADDON_STATUS enum ADDON_STATUS + /// @brief Return value of functions in @ref cpp_kodi_addon_addonbase "kodi::addon::CAddonBase" + /// and associated classes\n + /// With this Kodi can do any follow-up work or add-on e.g. declare it as defective. /// ///@{ typedef enum ADDON_STATUS @@ -211,7 +232,7 @@ extern "C" typedef struct KodiToAddonFuncTable_Addon { void (*destroy)(); - ADDON_STATUS (*get_status)(); + ADDON_STATUS (*get_status)(); // TODO unused remove by next min version increase ADDON_STATUS(*create_instance) (int instanceType, const char* instanceID, diff --git a/xbmc/addons/kodi-dev-kit/include/kodi/c-api/audio_engine.h b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/audio_engine.h index 97510f7..dcb004c 100644 --- a/xbmc/addons/kodi-dev-kit/include/kodi/c-api/audio_engine.h +++ b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/audio_engine.h @@ -6,8 +6,6 @@ * See LICENSES/README.md for more information. */ -#pragma once - #ifndef C_API_AUDIO_ENGINE_H #define C_API_AUDIO_ENGINE_H diff --git a/xbmc/addons/kodi-dev-kit/include/kodi/c-api/filesystem.h b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/filesystem.h index 70f9400..4290cb9 100644 --- a/xbmc/addons/kodi-dev-kit/include/kodi/c-api/filesystem.h +++ b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/filesystem.h @@ -6,8 +6,6 @@ * See LICENSES/README.md for more information. */ -#pragma once - #ifndef C_API_FILESYSTEM_H #define C_API_FILESYSTEM_H @@ -106,16 +104,15 @@ extern "C" /// @brief **CURL message types**\n /// Used on kodi::vfs::CFile::CURLAddOption(). /// - //@{ + ///@{ typedef enum CURLOptiontype { /// @brief Set a general option. ADDON_CURL_OPTION_OPTION, - /// @brief Set a protocol option. - /// + /// @brief Set a protocol option.\n + ///\n /// The following names for *ADDON_CURL_OPTION_PROTOCOL* are possible: - /// /// | Option name | Description /// |------------------------------------:|:-------------------------------- /// | `accept-charset` | Set the "accept-charset" header @@ -140,7 +137,7 @@ extern "C" /// @brief Add a Header ADDON_CURL_OPTION_HEADER } CURLOptiontype; - //@} + ///@} //---------------------------------------------------------------------------- //============================================================================ @@ -151,7 +148,7 @@ extern "C" /// /// Used on kodi::vfs::CFile::GetPropertyValue() and kodi::vfs::CFile::GetPropertyValues(). /// - //@{ + ///@{ typedef enum FilePropertyTypes { /// @brief Get protocol response line. @@ -167,7 +164,7 @@ extern "C" /// @brief Get file effective URL (last one if redirected). ADDON_FILE_PROPERTY_EFFECTIVE_URL } FilePropertyTypes; - //@} + ///@} //---------------------------------------------------------------------------- //}}} diff --git a/xbmc/addons/kodi-dev-kit/include/kodi/c-api/general.h b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/general.h index 12afd02..8518a96 100644 --- a/xbmc/addons/kodi-dev-kit/include/kodi/c-api/general.h +++ b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/general.h @@ -6,8 +6,6 @@ * See LICENSES/README.md for more information. */ -#pragma once - #ifndef C_API_GENERAL_H #define C_API_GENERAL_H diff --git a/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/controls/button.h b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/controls/button.h index 84fd822..46de262 100644 --- a/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/controls/button.h +++ b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/controls/button.h @@ -6,8 +6,6 @@ * See LICENSES/README.md for more information. */ -#pragma once - #ifndef C_API_GUI_CONTROLS_BUTTON_H #define C_API_GUI_CONTROLS_BUTTON_H diff --git a/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/controls/edit.h b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/controls/edit.h index ca38b27..571c7ce 100644 --- a/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/controls/edit.h +++ b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/controls/edit.h @@ -6,8 +6,6 @@ * See LICENSES/README.md for more information. */ -#pragma once - #ifndef C_API_GUI_CONTROLS_EDIT_H #define C_API_GUI_CONTROLS_EDIT_H diff --git a/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/controls/fade_label.h b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/controls/fade_label.h index fea014b..dab4574 100644 --- a/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/controls/fade_label.h +++ b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/controls/fade_label.h @@ -6,8 +6,6 @@ * See LICENSES/README.md for more information. */ -#pragma once - #ifndef C_API_GUI_CONTROLS_FADE_LABEL_H #define C_API_GUI_CONTROLS_FADE_LABEL_H diff --git a/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/controls/image.h b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/controls/image.h index 4a46e6d..257dd67 100644 --- a/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/controls/image.h +++ b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/controls/image.h @@ -6,8 +6,6 @@ * See LICENSES/README.md for more information. */ -#pragma once - #ifndef C_API_GUI_CONTROLS_IMAGE_H #define C_API_GUI_CONTROLS_IMAGE_H diff --git a/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/controls/label.h b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/controls/label.h index d8a9fe4..92af25c 100644 --- a/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/controls/label.h +++ b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/controls/label.h @@ -6,8 +6,6 @@ * See LICENSES/README.md for more information. */ -#pragma once - #ifndef C_API_GUI_CONTROLS_LABEL_H #define C_API_GUI_CONTROLS_LABEL_H diff --git a/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/controls/progress.h b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/controls/progress.h index 88638e0..4f211fd 100644 --- a/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/controls/progress.h +++ b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/controls/progress.h @@ -6,8 +6,6 @@ * See LICENSES/README.md for more information. */ -#pragma once - #ifndef C_API_GUI_CONTROLS_PROGRESS_H #define C_API_GUI_CONTROLS_PROGRESS_H diff --git a/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/controls/radio_button.h b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/controls/radio_button.h index a672d95..d652e67 100644 --- a/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/controls/radio_button.h +++ b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/controls/radio_button.h @@ -6,8 +6,6 @@ * See LICENSES/README.md for more information. */ -#pragma once - #ifndef C_API_GUI_CONTROLS_RADIO_BUTTON_H #define C_API_GUI_CONTROLS_RADIO_BUTTON_H diff --git a/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/controls/rendering.h b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/controls/rendering.h index d4053a6..792a8d6 100644 --- a/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/controls/rendering.h +++ b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/controls/rendering.h @@ -6,8 +6,6 @@ * See LICENSES/README.md for more information. */ -#pragma once - #ifndef C_API_GUI_CONTROLS_RENDERING_H #define C_API_GUI_CONTROLS_RENDERING_H diff --git a/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/controls/settings_slider.h b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/controls/settings_slider.h index 2cbc972..4299252 100644 --- a/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/controls/settings_slider.h +++ b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/controls/settings_slider.h @@ -6,8 +6,6 @@ * See LICENSES/README.md for more information. */ -#pragma once - #ifndef C_API_GUI_CONTROLS_SETTINGS_SLIDER_H #define C_API_GUI_CONTROLS_SETTINGS_SLIDER_H diff --git a/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/controls/slider.h b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/controls/slider.h index 0a67208..67c6c2f 100644 --- a/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/controls/slider.h +++ b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/controls/slider.h @@ -6,8 +6,6 @@ * See LICENSES/README.md for more information. */ -#pragma once - #ifndef C_API_GUI_CONTROLS_SLIDER_H #define C_API_GUI_CONTROLS_SLIDER_H diff --git a/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/controls/spin.h b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/controls/spin.h index d5e5c86..0373636 100644 --- a/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/controls/spin.h +++ b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/controls/spin.h @@ -6,8 +6,6 @@ * See LICENSES/README.md for more information. */ -#pragma once - #ifndef C_API_GUI_CONTROLS_SPIN_H #define C_API_GUI_CONTROLS_SPIN_H diff --git a/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/controls/text_box.h b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/controls/text_box.h index 276d04c..333689e 100644 --- a/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/controls/text_box.h +++ b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/controls/text_box.h @@ -6,8 +6,6 @@ * See LICENSES/README.md for more information. */ -#pragma once - #ifndef C_API_GUI_CONTROLS_TEXT_BOX_H #define C_API_GUI_CONTROLS_TEXT_BOX_H diff --git a/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/definitions.h b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/definitions.h index ec60bc2..f0ea9a2 100644 --- a/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/definitions.h +++ b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/definitions.h @@ -6,8 +6,6 @@ * See LICENSES/README.md for more information. */ -#pragma once - #ifndef C_API_GUI_DEFINITIONS_H #define C_API_GUI_DEFINITIONS_H diff --git a/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/dialogs/context_menu.h b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/dialogs/context_menu.h index 8bb5370..130d831 100644 --- a/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/dialogs/context_menu.h +++ b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/dialogs/context_menu.h @@ -6,8 +6,6 @@ * See LICENSES/README.md for more information. */ -#pragma once - #ifndef C_API_GUI_DIALOGS_CONTEXT_MENU_H #define C_API_GUI_DIALOGS_CONTEXT_MENU_H diff --git a/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/dialogs/extended_progress.h b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/dialogs/extended_progress.h index e53588f..0992d5c 100644 --- a/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/dialogs/extended_progress.h +++ b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/dialogs/extended_progress.h @@ -6,8 +6,6 @@ * See LICENSES/README.md for more information. */ -#pragma once - #ifndef C_API_GUI_DIALOGS_EXTENDED_PROGRESS_H #define C_API_GUI_DIALOGS_EXTENDED_PROGRESS_H diff --git a/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/dialogs/filebrowser.h b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/dialogs/filebrowser.h index 7ae4fac..ef3945b 100644 --- a/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/dialogs/filebrowser.h +++ b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/dialogs/filebrowser.h @@ -6,8 +6,6 @@ * See LICENSES/README.md for more information. */ -#pragma once - #ifndef C_API_GUI_DIALOGS_FILEBROWSER_H #define C_API_GUI_DIALOGS_FILEBROWSER_H diff --git a/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/dialogs/keyboard.h b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/dialogs/keyboard.h index fc3c34c..f84dc20 100644 --- a/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/dialogs/keyboard.h +++ b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/dialogs/keyboard.h @@ -6,8 +6,6 @@ * See LICENSES/README.md for more information. */ -#pragma once - #ifndef C_API_GUI_DIALOGS_KEYBOARD_H #define C_API_GUI_DIALOGS_KEYBOARD_H diff --git a/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/dialogs/numeric.h b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/dialogs/numeric.h index df23cd7..08aaf25 100644 --- a/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/dialogs/numeric.h +++ b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/dialogs/numeric.h @@ -6,8 +6,6 @@ * See LICENSES/README.md for more information. */ -#pragma once - #ifndef C_API_GUI_DIALOGS_NUMERIC_H #define C_API_GUI_DIALOGS_NUMERIC_H diff --git a/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/dialogs/ok.h b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/dialogs/ok.h index 9f37051..45fe0fc 100644 --- a/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/dialogs/ok.h +++ b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/dialogs/ok.h @@ -6,8 +6,6 @@ * See LICENSES/README.md for more information. */ -#pragma once - #ifndef C_API_GUI_DIALOGS_OK_H #define C_API_GUI_DIALOGS_OK_H diff --git a/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/dialogs/progress.h b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/dialogs/progress.h index f1c8972..60a003a 100644 --- a/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/dialogs/progress.h +++ b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/dialogs/progress.h @@ -6,8 +6,6 @@ * See LICENSES/README.md for more information. */ -#pragma once - #ifndef C_API_GUI_DIALOGS_PROGRESS_H #define C_API_GUI_DIALOGS_PROGRESS_H diff --git a/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/dialogs/select.h b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/dialogs/select.h index 41ab82f..79635d7 100644 --- a/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/dialogs/select.h +++ b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/dialogs/select.h @@ -6,8 +6,6 @@ * See LICENSES/README.md for more information. */ -#pragma once - #ifndef C_API_GUI_DIALOGS_SELECT_H #define C_API_GUI_DIALOGS_SELECT_H diff --git a/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/dialogs/text_viewer.h b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/dialogs/text_viewer.h index eb38b0b..4a1cfe6 100644 --- a/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/dialogs/text_viewer.h +++ b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/dialogs/text_viewer.h @@ -6,8 +6,6 @@ * See LICENSES/README.md for more information. */ -#pragma once - #ifndef C_API_GUI_DIALOGS_TEXT_VIEWER_H #define C_API_GUI_DIALOGS_TEXT_VIEWER_H diff --git a/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/dialogs/yes_no.h b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/dialogs/yes_no.h index 01ed806..8558acb 100644 --- a/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/dialogs/yes_no.h +++ b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/dialogs/yes_no.h @@ -6,8 +6,6 @@ * See LICENSES/README.md for more information. */ -#pragma once - #ifndef C_API_GUI_DIALOGS_YES_NO_H #define C_API_GUI_DIALOGS_YES_NO_H diff --git a/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/general.h b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/general.h index d0d256c..6769867 100644 --- a/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/general.h +++ b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/general.h @@ -6,8 +6,6 @@ * See LICENSES/README.md for more information. */ -#pragma once - #ifndef C_API_GUI_GENERAL_H #define C_API_GUI_GENERAL_H diff --git a/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/input/action_ids.h b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/input/action_ids.h index 274f3d9..5d62587 100644 --- a/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/input/action_ids.h +++ b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/input/action_ids.h @@ -6,8 +6,6 @@ * See LICENSES/README.md for more information. */ -#pragma once - #ifndef C_API_GUI_ACTION_IDS_H #define C_API_GUI_ACTION_IDS_H diff --git a/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/list_item.h b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/list_item.h index f0c4dc7..d2120ac 100644 --- a/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/list_item.h +++ b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/list_item.h @@ -6,8 +6,6 @@ * See LICENSES/README.md for more information. */ -#pragma once - #ifndef C_API_GUI_LIST_ITEM_H #define C_API_GUI_LIST_ITEM_H diff --git a/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/window.h b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/window.h index 0f844f5..d7181c0 100644 --- a/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/window.h +++ b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/gui/window.h @@ -6,8 +6,6 @@ * See LICENSES/README.md for more information. */ -#pragma once - #ifndef C_API_GUI_WINDOW_H #define C_API_GUI_WINDOW_H diff --git a/xbmc/addons/kodi-dev-kit/include/kodi/c-api/network.h b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/network.h index 88d5231..8bd987b 100644 --- a/xbmc/addons/kodi-dev-kit/include/kodi/c-api/network.h +++ b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/network.h @@ -6,8 +6,6 @@ * See LICENSES/README.md for more information. */ -#pragma once - #ifndef C_API_NETWORK_H #define C_API_NETWORK_H diff --git a/xbmc/addons/kodi-dev-kit/include/kodi/c-api/platform/android/system.h b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/platform/android/system.h index 568a2fd..09d8c8c 100644 --- a/xbmc/addons/kodi-dev-kit/include/kodi/c-api/platform/android/system.h +++ b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/platform/android/system.h @@ -6,8 +6,6 @@ * See LICENSES/README.md for more information. */ -#pragma once - #ifndef C_API_PLATFORM_ANDROID_H #define C_API_PLATFORM_ANDROID_H -- cgit v1.2.3