summaryrefslogtreecommitdiffstats
path: root/xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/inputstream/demux_packet.h
diff options
context:
space:
mode:
authormanuel <manuel@mausz.at>2021-03-04 23:36:40 +0100
committermanuel <manuel@mausz.at>2021-03-04 23:36:40 +0100
commit3cb8aa05f8cee9e860cf83531682ff0ed4af6a4f (patch)
tree921f4829b32126f80f9113c124f2e14c0ebce8d9 /xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/inputstream/demux_packet.h
parentbe933ef2241d79558f91796cc5b3a161f72ebf9c (diff)
downloadkodi-pvr-build-Matrix.tar.gz
kodi-pvr-build-Matrix.tar.bz2
kodi-pvr-build-Matrix.zip
sync with upstreamMatrix
Diffstat (limited to 'xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/inputstream/demux_packet.h')
-rw-r--r--xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/inputstream/demux_packet.h117
1 files changed, 117 insertions, 0 deletions
diff --git a/xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/inputstream/demux_packet.h b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/inputstream/demux_packet.h
new file mode 100644
index 0000000..79686ab
--- /dev/null
+++ b/xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/inputstream/demux_packet.h
@@ -0,0 +1,117 @@
1/*
2 * Copyright (C) 2005-2020 Team Kodi
3 * This file is part of Kodi - https://kodi.tv
4 *
5 * SPDX-License-Identifier: GPL-2.0-or-later
6 * See LICENSES/README.md for more information.
7 */
8
9#ifndef C_API_ADDONINSTANCE_INPUTSTREAM_DEMUXPACKET_H
10#define C_API_ADDONINSTANCE_INPUTSTREAM_DEMUXPACKET_H
11
12#include "timing_constants.h"
13
14#include <stdbool.h>
15#include <stdint.h>
16
17#define DEMUX_SPECIALID_STREAMINFO -10
18#define DEMUX_SPECIALID_STREAMCHANGE -11
19
20#ifdef __cplusplus
21extern "C"
22{
23#endif /* __cplusplus */
24
25 struct DEMUX_CRYPTO_INFO;
26
27 //============================================================================
28 /// @defgroup cpp_kodi_addon_inputstream_Defs_Interface_DEMUX_PACKET struct DEMUX_PACKET
29 /// @ingroup cpp_kodi_addon_inputstream_Defs_Interface
30 /// @brief **Demux packet**\n
31 /// To processed codec and demux inputstream stream.
32 ///
33 /// This part is in the "C" style in order to have better performance and
34 /// possibly to be used in "C" libraries.
35 ///
36 /// The structure should be created with @ref kodi::addon::CInstanceInputStream::AllocateDemuxPacket()
37 /// or @ref kodi::addon::CInstanceInputStream::AllocateEncryptedDemuxPacket()
38 /// and if not added to Kodi with @ref kodi::addon::CInstanceInputStream::FreeDemuxPacket()
39 /// be deleted again.
40 ///
41 /// Packages that have been given to Kodi and processed will then be deleted
42 /// by him.
43 ///
44 ///@{
45 struct DEMUX_PACKET
46 {
47 /// @brief Stream package which is given for decoding.
48 ///
49 /// @note Associated storage from here is created using
50 /// @ref kodi::addon::CInstanceInputStream::AllocateDemuxPacket()
51 /// or @ref kodi::addon::CInstanceInputStream::AllocateEncryptedDemuxPacket().
52 uint8_t* pData;
53
54 /// @brief Size of the package given at @ref pData.
55 int iSize;
56
57 /// @brief Identification of the stream.
58 int iStreamId;
59
60 /// @brief Identification of the associated demuxer, this can be identical
61 /// on several streams.
62 int64_t demuxerId;
63
64 /// @brief The group this data belongs to, used to group data from different
65 /// streams together.
66 int iGroupId;
67
68 //------------------------------------------
69
70 /// @brief Additional packet data that can be provided by the container.
71 ///
72 /// Packet can contain several types of side information.
73 ///
74 /// This is usually based on that of ffmpeg, see
75 /// [AVPacketSideData](https://ffmpeg.org/doxygen/trunk/structAVPacketSideData.html).
76 void* pSideData;
77
78 /// @brief Data elements stored at @ref pSideData.
79 int iSideDataElems;
80
81 //------------------------------------------
82
83 /// @brief Presentation time stamp (PTS).
84 double pts;
85
86 /// @brief Decoding time stamp (DTS).
87 double dts;
88
89 /// @brief Duration in @ref STREAM_TIME_BASE if available
90 double duration;
91
92 /// @brief Display time from input stream
93 int dispTime;
94
95 /// @brief To show that this package allows recreating the presentation by
96 /// mistake.
97 bool recoveryPoint;
98
99 //------------------------------------------
100
101 /// @brief Optional data to allow decryption at processing site if
102 /// necessary.
103 ///
104 /// This can be created using @ref kodi::addon::CInstanceInputStream::AllocateEncryptedDemuxPacket(),
105 /// otherwise this is declared as <b>`nullptr`</b>.
106 ///
107 /// See @ref DEMUX_CRYPTO_INFO for their style.
108 struct DEMUX_CRYPTO_INFO* cryptoInfo;
109 };
110 ///@}
111 //----------------------------------------------------------------------------
112
113#ifdef __cplusplus
114} /* extern "C" */
115#endif /* __cplusplus */
116
117#endif /* !C_API_ADDONINSTANCE_INPUTSTREAM_DEMUXPACKET_H */