kodi
demux_packet.h
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
21 extern "C"
22 {
23 #endif /* __cplusplus */
24 
25  struct DEMUX_CRYPTO_INFO;
26 
27  //============================================================================
45  struct DEMUX_PACKET
46  {
52  uint8_t* pData;
53 
55  int iSize;
56 
58  int iStreamId;
59 
62  int64_t demuxerId;
63 
66  int iGroupId;
67 
68  //------------------------------------------
69 
76  void* pSideData;
77 
80 
81  //------------------------------------------
82 
84  double pts;
85 
87  double dts;
88 
90  double duration;
91 
93  int dispTime;
94 
98 
99  //------------------------------------------
100 
109  };
111  //----------------------------------------------------------------------------
112 
113 #ifdef __cplusplus
114 } /* extern "C" */
115 #endif /* __cplusplus */
116 
117 #endif /* !C_API_ADDONINSTANCE_INPUTSTREAM_DEMUXPACKET_H */
int iSize
Size of the package given at pData.
Definition: demux_packet.h:55
int iStreamId
Identification of the stream.
Definition: demux_packet.h:58
double pts
Presentation time stamp (PTS).
Definition: demux_packet.h:84
Definition: stream_crypto.h:85
int iSideDataElems
Data elements stored at pSideData.
Definition: demux_packet.h:79
bool recoveryPoint
To show that this package allows recreating the presentation by mistake.
Definition: demux_packet.h:97
double duration
Duration in STREAM_TIME_BASE if available.
Definition: demux_packet.h:90
void * pSideData
Additional packet data that can be provided by the container.
Definition: demux_packet.h:76
double dts
Decoding time stamp (DTS).
Definition: demux_packet.h:87
Definition: demux_packet.h:45
int64_t demuxerId
Identification of the associated demuxer, this can be identical on several streams.
Definition: demux_packet.h:62
struct DEMUX_CRYPTO_INFO * cryptoInfo
Optional data to allow decryption at processing site if necessary.
Definition: demux_packet.h:108
uint8_t * pData
Stream package which is given for decoding.
Definition: demux_packet.h:52
int iGroupId
The group this data belongs to, used to group data from different streams together.
Definition: demux_packet.h:66
int dispTime
Display time from input stream.
Definition: demux_packet.h:93