diff options
Diffstat (limited to 'xbmc/addons/kodi-addon-dev-kit/include/kodi/c-api/addon-instance/pvr/pvr_stream.h')
| -rw-r--r-- | xbmc/addons/kodi-addon-dev-kit/include/kodi/c-api/addon-instance/pvr/pvr_stream.h | 155 |
1 files changed, 155 insertions, 0 deletions
diff --git a/xbmc/addons/kodi-addon-dev-kit/include/kodi/c-api/addon-instance/pvr/pvr_stream.h b/xbmc/addons/kodi-addon-dev-kit/include/kodi/c-api/addon-instance/pvr/pvr_stream.h new file mode 100644 index 0000000..04b4059 --- /dev/null +++ b/xbmc/addons/kodi-addon-dev-kit/include/kodi/c-api/addon-instance/pvr/pvr_stream.h | |||
| @@ -0,0 +1,155 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) 2005-2018 Team Kodi | ||
| 3 | * This file is part of Kodi - https://kodi.tv | ||
| 4 | * | ||
| 5 | * SPDX-License-Identifier: GPL-2.0-or-later | ||
| 6 | * See LICENSES/README.md for more information. | ||
| 7 | */ | ||
| 8 | |||
| 9 | #pragma once | ||
| 10 | |||
| 11 | #include "pvr_defines.h" | ||
| 12 | |||
| 13 | #ifdef BUILD_KODI_ADDON | ||
| 14 | #include "../../../DemuxPacket.h" | ||
| 15 | #else | ||
| 16 | #include "cores/VideoPlayer/Interface/Addon/DemuxPacket.h" | ||
| 17 | #endif | ||
| 18 | |||
| 19 | #include <stdint.h> | ||
| 20 | #include <time.h> | ||
| 21 | |||
| 22 | //¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ | ||
| 23 | // "C" Definitions group 9 - PVR stream definitions (NOTE: Becomes replaced | ||
| 24 | // in future by inputstream addon instance way) | ||
| 25 | #ifdef __cplusplus | ||
| 26 | extern "C" | ||
| 27 | { | ||
| 28 | #endif /* __cplusplus */ | ||
| 29 | |||
| 30 | //============================================================================ | ||
| 31 | /// @ingroup cpp_kodi_addon_pvr_Defs_Stream | ||
| 32 | /// @brief Maximum of allowed streams | ||
| 33 | /// | ||
| 34 | #define PVR_STREAM_MAX_STREAMS 20 | ||
| 35 | //---------------------------------------------------------------------------- | ||
| 36 | |||
| 37 | //============================================================================ | ||
| 38 | /// @ingroup cpp_kodi_addon_pvr_Defs_Stream | ||
| 39 | /// @brief Invalid codec identifier | ||
| 40 | /// | ||
| 41 | #define PVR_INVALID_CODEC_ID 0 | ||
| 42 | //---------------------------------------------------------------------------- | ||
| 43 | |||
| 44 | //============================================================================ | ||
| 45 | /// @ingroup cpp_kodi_addon_pvr_Defs_Stream | ||
| 46 | /// @brief Invalid codec | ||
| 47 | /// | ||
| 48 | #define PVR_INVALID_CODEC \ | ||
| 49 | { \ | ||
| 50 | PVR_CODEC_TYPE_UNKNOWN, PVR_INVALID_CODEC_ID \ | ||
| 51 | } | ||
| 52 | //---------------------------------------------------------------------------- | ||
| 53 | |||
| 54 | //============================================================================ | ||
| 55 | /// @defgroup cpp_kodi_addon_pvr_Defs_Stream_PVR_CODEC_TYPE enum PVR_CODEC_TYPE | ||
| 56 | /// @ingroup cpp_kodi_addon_pvr_Defs_Stream | ||
| 57 | /// @brief **Inputstream types**\n | ||
| 58 | /// To identify type on stream. | ||
| 59 | /// | ||
| 60 | /// Used on @ref kodi::addon::PVRStreamProperties::SetCodecType and @ref kodi::addon::PVRStreamProperties::SetCodecType. | ||
| 61 | /// | ||
| 62 | ///@{ | ||
| 63 | typedef enum PVR_CODEC_TYPE | ||
| 64 | { | ||
| 65 | /// @brief To set nothing defined. | ||
| 66 | PVR_CODEC_TYPE_UNKNOWN = -1, | ||
| 67 | |||
| 68 | /// @brief To identify @ref cpp_kodi_addon_pvr_Defs_Stream_PVRStreamProperties as Video. | ||
| 69 | PVR_CODEC_TYPE_VIDEO, | ||
| 70 | |||
| 71 | /// @brief To identify @ref cpp_kodi_addon_pvr_Defs_Stream_PVRStreamProperties as Audio. | ||
| 72 | PVR_CODEC_TYPE_AUDIO, | ||
| 73 | |||
| 74 | /// @brief To identify @ref cpp_kodi_addon_pvr_Defs_Stream_PVRStreamProperties as Data. | ||
| 75 | /// | ||
| 76 | /// With codec id related source identified. | ||
| 77 | PVR_CODEC_TYPE_DATA, | ||
| 78 | |||
| 79 | /// @brief To identify @ref cpp_kodi_addon_pvr_Defs_Stream_PVRStreamProperties as Subtitle. | ||
| 80 | PVR_CODEC_TYPE_SUBTITLE, | ||
| 81 | |||
| 82 | /// @brief To identify @ref cpp_kodi_addon_pvr_Defs_Stream_PVRStreamProperties as Radio RDS. | ||
| 83 | PVR_CODEC_TYPE_RDS, | ||
| 84 | |||
| 85 | PVR_CODEC_TYPE_NB | ||
| 86 | } PVR_CODEC_TYPE; | ||
| 87 | ///@} | ||
| 88 | //---------------------------------------------------------------------------- | ||
| 89 | |||
| 90 | //============================================================================ | ||
| 91 | /// @defgroup cpp_kodi_addon_pvr_Defs_Stream_PVR_CODEC struct PVR_CODEC | ||
| 92 | /// @ingroup cpp_kodi_addon_pvr_Defs_Stream | ||
| 93 | /// @brief **Codec identification structure**\n | ||
| 94 | /// Identifier about stream between Kodi and addon. | ||
| 95 | /// | ||
| 96 | ///@{ | ||
| 97 | typedef struct PVR_CODEC | ||
| 98 | { | ||
| 99 | /// @brief Used codec type for stream. | ||
| 100 | enum PVR_CODEC_TYPE codec_type; | ||
| 101 | |||
| 102 | /// @brief Related codec identifier, normally match the ffmpeg id's. | ||
| 103 | unsigned int codec_id; | ||
| 104 | } PVR_CODEC; | ||
| 105 | ///@} | ||
| 106 | //---------------------------------------------------------------------------- | ||
| 107 | |||
| 108 | /*! | ||
| 109 | * @brief "C" Stream properties | ||
| 110 | * | ||
| 111 | * Structure used to interface in "C" between Kodi and Addon. | ||
| 112 | * | ||
| 113 | * See @ref cpp_kodi_addon_pvr_Defs_Stream_PVRStreamProperties for description of values. | ||
| 114 | */ | ||
| 115 | typedef struct PVR_STREAM_PROPERTIES | ||
| 116 | { | ||
| 117 | unsigned int iStreamCount; | ||
| 118 | struct PVR_STREAM | ||
| 119 | { | ||
| 120 | unsigned int iPID; | ||
| 121 | enum PVR_CODEC_TYPE iCodecType; | ||
| 122 | unsigned int iCodecId; | ||
| 123 | char strLanguage[4]; | ||
| 124 | int iSubtitleInfo; | ||
| 125 | int iFPSScale; | ||
| 126 | int iFPSRate; | ||
| 127 | int iHeight; | ||
| 128 | int iWidth; | ||
| 129 | float fAspect; | ||
| 130 | int iChannels; | ||
| 131 | int iSampleRate; | ||
| 132 | int iBlockAlign; | ||
| 133 | int iBitRate; | ||
| 134 | int iBitsPerSample; | ||
| 135 | } stream[PVR_STREAM_MAX_STREAMS]; | ||
| 136 | } PVR_STREAM_PROPERTIES; | ||
| 137 | |||
| 138 | /*! | ||
| 139 | * @brief "C" Times of playing stream (Live TV and recordings) | ||
| 140 | * | ||
| 141 | * Structure used to interface in "C" between Kodi and Addon. | ||
| 142 | * | ||
| 143 | * See @ref cpp_kodi_addon_pvr_Defs_Stream_PVRStreamTimes for description of values. | ||
| 144 | */ | ||
| 145 | typedef struct PVR_STREAM_TIMES | ||
| 146 | { | ||
| 147 | time_t startTime; | ||
| 148 | int64_t ptsStart; | ||
| 149 | int64_t ptsBegin; | ||
| 150 | int64_t ptsEnd; | ||
| 151 | } PVR_STREAM_TIMES; | ||
| 152 | |||
| 153 | #ifdef __cplusplus | ||
| 154 | } | ||
| 155 | #endif /* __cplusplus */ | ||
