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