Debian Codegraph @

src/mpegts.h

raw symbols SCIP
1 /* librist. Copyright © 2020 SipRadius LLC. All right reserved.
2 * Author: Gijs Peskens <[email protected]>
3 * Author: Sergio Ammirata, Ph.D. <[email protected]>
4 *
5 * SPDX-License-Identifier: BSD-2-Clause
6 */
7
8 #ifndef RIST_MPEGTS
9 #define RIST_MPEGTS
10 #include "udp-private.h"
11 #include "common/attributes.h"
12 #include <stdint.h>
13 #include <stddef.h>
14
15 /*
16 Needed for nullpacket deletion, values are for null packets:
17 0 1 2 3
18 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
19 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
20 | Sync Byte |E|P|T| PID |TSC| AF| CC |
21 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
22 Sync Byte 0x47
23 E: Transport error indicator (TEI) 0
24 P: Payload unit start indicator (PUSI) 0
25 T: Transport Priority 0
26 PID: 0x1ff (null packet pid)
27 TSC: Transport scambling control 0
28 AF: Adaptation field control 1 (payload only)
29 CC: Continuity counter 0
30 */
31
32 RIST_PACKED_STRUCT(mpegts_header, {
33 uint8_t syncbyte;
34 uint16_t flags1;
35 uint8_t flags2;
36 })
37
38 RIST_PRIV int suppress_null_packets(const uint8_t payload_in[], uint8_t payload_out[], size_t *payload_len, struct rist_rtp_hdr_ext *header_ext);
39 RIST_PRIV int expand_null_packets(uint8_t payload_in[], uint8_t payload_out[], size_t *payload_len, uint8_t npd_bits);
40
41 #endif