blob: 79686abc9b7b2380c1950eceefc50673faee4fc1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
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 <stdbool.h>
#include <stdint.h>
#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 <b>`nullptr`</b>.
///
/// 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 */
|