ROHC compression/decompression library
c_rtp.h
Go to the documentation of this file.
1 /*
2  * Copyright 2007,2008 CNES
3  * Copyright 2010,2011,2012,2013 Didier Barvaux
4  * Copyright 2007,2008 Thales Alenia Space
5  * Copyright 2007,2009,2010 Viveris Technologies
6  *
7  * This library is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU Lesser General Public
9  * License as published by the Free Software Foundation; either
10  * version 2.1 of the License, or (at your option) any later version.
11  *
12  * This library is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15  * Lesser General Public License for more details.
16  *
17  * You should have received a copy of the GNU Lesser General Public
18  * License along with this library; if not, write to the Free Software
19  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20  */
21 
22 /**
23  * @file c_rtp.h
24  * @brief ROHC compression context for the RTP profile.
25  * @author David Moreau from TAS
26  * @author Didier Barvaux <didier.barvaux@toulouse.viveris.com>
27  */
28 
29 #ifndef ROHC_COMP_RTP_H
30 #define ROHC_COMP_RTP_H
31 
32 #include "rohc_comp_rfc3095.h"
34 #include "protocols/udp.h"
35 #include "protocols/rtp.h"
36 
37 
38 /**
39  * @brief Define the RTP and UDP specific temporary variables in the profile
40  * compression context.
41  *
42  * This object must be used by the RTP-specific decompression context
43  * sc_rtp_context.
44  *
45  * @see sc_rtp_context
46  */
48 {
49  /// The number of UDP/RTP fields that changed in the UDP/RTP headers
51 
52  /// The number of bits needed to encode ts_send
55 
56  /// The number of bits of TS to place in the extension 3 header
58 
59  /// The TS field to send (ts_scaled or ts)
60  uint32_t ts_send;
61 
62  /// Whether the Marker (M) bit is set in the RTP header or not
64 
65  /** Whether the Padding (P) bit changed or not */
67 
68  /// Whether the eXtension (X) bit changed or not
70 
71  /// Whether the Payload Type (PT) field changed or not
73 };
74 
75 
76 /**
77  * @brief Define the RTP part of the profile decompression context.
78  *
79  * This object must be used with the generic part of the decompression
80  * context rohc_comp_rfc3095_ctxt.
81  *
82  * @warning The 2 first fields MUST stay at the beginning of the structure
83  * to be compatible with \ref sc_udp_context
84  *
85  * @see rohc_comp_rfc3095_ctxt
86  */
88 {
89  /// @brief The number of times the UDP checksum field was added to the
90  /// compressed header
92 
93  /// The previous UDP header
94  struct udphdr old_udp;
95 
96  /// @brief The number of times the RTP Version field was added to
97  /// the compressed header
99 
100  /// @brief The number of times the RTP Payload Type (PT) field was added to
101  /// the compressed header
103 
104  /// @brief The number of times the RTP Padding (P) bit was added to
105  /// the compressed header
107 
108  /// @brief The number of times the RTP eXtension (X) bit was added to
109  /// the compressed header
111 
112  /// The previous RTP header
113  struct rtphdr old_rtp;
114 
115  /// @brief RTP-specific temporary variables that are used during one single
116  /// compression of packet
118 
119  /// Scaled RTP Time Stamp
120  int tss;
121 
122  /// Whether the Time Stride field is present or not
123  int tis;
124 
125  /// Structure to encode the TS field
127 };
128 
129 
130 /*
131  * Function prototypes.
132  */
133 
134 /* no public function */
135 
136 #endif
137 
int rtp_pt_changed
Whether the Payload Type (PT) field changed or not.
Definition: c_rtp.h:72
Define the RTP part of the profile decompression context.
Definition: c_rtp.h:87
int tis
Whether the Time Stride field is present or not.
Definition: c_rtp.h:123
Generic framework for RFC3095-based compression profiles such as IP-only, UDP, UDP-Lite, ESP, and RTP profiles.
bool padding_bit_changed
Definition: c_rtp.h:66
Scaled RTP Timestamp encoding object.
Definition: comp_scaled_rtp_ts.h:67
Define the RTP and UDP specific temporary variables in the profile compression context.
Definition: c_rtp.h:47
size_t rtp_pt_change_count
The number of times the RTP Payload Type (PT) field was added to the compressed header.
Definition: c_rtp.h:102
struct udphdr old_udp
The previous UDP header.
Definition: c_rtp.h:94
Scaled RTP Timestamp encoding.
size_t udp_checksum_change_count
The number of times the UDP checksum field was added to the compressed header.
Definition: c_rtp.h:91
bool extension_bit_changed
Whether the eXtension (X) bit changed or not.
Definition: c_rtp.h:69
int tss
Scaled RTP Time Stamp.
Definition: c_rtp.h:120
uint32_t ts_send
The TS field to send (ts_scaled or ts)
Definition: c_rtp.h:60
struct rtp_tmp_vars tmp
RTP-specific temporary variables that are used during one single compression of packet.
Definition: c_rtp.h:117
size_t rtp_padding_change_count
The number of times the RTP Padding (P) bit was added to the compressed header.
Definition: c_rtp.h:106
size_t rtp_extension_change_count
The number of times the RTP eXtension (X) bit was added to the compressed header. ...
Definition: c_rtp.h:110
size_t nr_ts_bits_less_equal_than_2
The number of bits needed to encode ts_send.
Definition: c_rtp.h:53
Definition: udp.h:38
The RTP header.
Definition: rtp.h:48
size_t nr_ts_bits_more_than_2
Definition: c_rtp.h:54
struct rtphdr old_rtp
The previous RTP header.
Definition: c_rtp.h:113
size_t nr_ts_bits_ext3
The number of bits of TS to place in the extension 3 header.
Definition: c_rtp.h:57
struct ts_sc_comp ts_sc
Structure to encode the TS field.
Definition: c_rtp.h:126
bool is_marker_bit_set
Whether the Marker (M) bit is set in the RTP header or not.
Definition: c_rtp.h:63
int send_rtp_dynamic
The number of UDP/RTP fields that changed in the UDP/RTP headers.
Definition: c_rtp.h:50
RTP header.
size_t rtp_version_change_count
The number of times the RTP Version field was added to the compressed header.
Definition: c_rtp.h:98
Defines the UDP header.