31 #ifndef ROHC_COMP_SCHEMES_SCALED_RTP_TS_H 32 #define ROHC_COMP_SCHEMES_SCALED_RTP_TS_H 114 const size_t wlsb_window_width,
116 void *
const trace_cb_priv)
117 __attribute__((nonnull(1)));
122 __attribute__((nonnull(1)));
125 size_t *
const bits_nr_less_equal_than_2,
126 size_t *
const bits_nr_more_than_2)
127 __attribute__((nonnull(1, 2, 3)));
129 __attribute__((nonnull(1)));
132 size_t *
const bits_nr_less_equal_than_2,
133 size_t *
const bits_nr_more_than_2)
134 __attribute__((nonnull(1, 2, 3)));
136 __attribute__((nonnull(1)));
139 __attribute__((nonnull(1), warn_unused_result, pure));
141 __attribute__((nonnull(1), warn_unused_result, pure));
143 __attribute__((nonnull(1), warn_unused_result, pure));
146 __attribute__((nonnull(1), warn_unused_result, pure));
struct c_wlsb ts_scaled_wlsb
Definition: comp_scaled_rtp_ts.h:71
void nb_bits_scaled(const struct ts_sc_comp *const ts_sc, size_t *const bits_nr_less_equal_than_2, size_t *const bits_nr_more_than_2)
Return the number of bits needed to encode TS_SCALED.
Definition: comp_scaled_rtp_ts.c:379
uint32_t get_ts_unscaled(const struct ts_sc_comp *const ts_sc)
Return the unscaled TS value.
Definition: comp_scaled_rtp_ts.c:446
Scaled RTP Timestamp encoding object.
Definition: comp_scaled_rtp_ts.h:63
struct c_wlsb ts_unscaled_wlsb
Definition: comp_scaled_rtp_ts.h:79
void add_scaled(struct ts_sc_comp *const ts_sc, const uint16_t sn)
Add a new TS_SCALED value to the ts_sc_comp object.
Definition: comp_scaled_rtp_ts.c:410
uint32_t get_ts_scaled(const struct ts_sc_comp *const ts_sc)
Return the TS_SCALED value.
Definition: comp_scaled_rtp_ts.c:434
uint32_t ts_offset
The TS_OFFSET value.
Definition: comp_scaled_rtp_ts.h:74
uint32_t get_ts_stride(const struct ts_sc_comp *const ts_sc)
Return the TS_STRIDE value.
Definition: comp_scaled_rtp_ts.c:422
Initialization state (TS_STRIDE value computed and sent)
Definition: comp_scaled_rtp_ts.h:51
uint32_t ts_scaled
The TS_SCALED value.
Definition: comp_scaled_rtp_ts.h:69
bool rohc_ts_sc_is_deducible(const struct ts_sc_comp *const ts_sc)
Whether TimeStamp (TS) is deducible from the Sequence Number (SN) or not.
Definition: comp_scaled_rtp_ts.c:459
bool are_old_val_init
Definition: comp_scaled_rtp_ts.h:94
rohc_trace_callback2_t trace_callback
Definition: comp_scaled_rtp_ts.h:102
void add_unscaled(struct ts_sc_comp *const ts_sc, const uint16_t sn)
Add a new unscaled TS value to the ts_sc_comp object.
Definition: comp_scaled_rtp_ts.c:362
uint16_t sn
The sequence number (SN)
Definition: comp_scaled_rtp_ts.h:84
void(* rohc_trace_callback2_t)(void *const priv_ctxt, const rohc_trace_level_t level, const rohc_trace_entity_t entity, const int profile, const char *const format,...)
The function prototype for the trace callback.
Definition: rohc_traces.h:118
uint32_t old_ts
The previous timestamp.
Definition: comp_scaled_rtp_ts.h:81
Window-based Least Significant Bits (W-LSB) encoding.
One W-LSB encoding object.
Definition: comp_wlsb.h:56
ts_sc_state state
The state of the scaled RTP Timestamp encoding object.
Definition: comp_scaled_rtp_ts.h:92
void c_init_sc(struct ts_sc_comp *const ts_sc, const size_t wlsb_window_width, rohc_trace_callback2_t trace_cb, void *const trace_cb_priv)
Create the ts_sc_comp object.
Definition: comp_scaled_rtp_ts.c:52
bool is_deducible
Whether timestamp is deducible from SN or not.
Definition: comp_scaled_rtp_ts.h:89
void nb_bits_unscaled(const struct ts_sc_comp *const ts_sc, size_t *const bits_nr_less_equal_than_2, size_t *const bits_nr_more_than_2)
Return the number of bits needed to encode unscaled TS.
Definition: comp_scaled_rtp_ts.c:345
Compression state (TS_SCALED value computed and sent)
Definition: comp_scaled_rtp_ts.h:53
uint32_t ts
The timestamp (TS)
Definition: comp_scaled_rtp_ts.h:77
ts_sc_state
State of scaled RTP Timestamp encoding.
Definition: comp_scaled_rtp_ts.h:46
void c_add_ts(struct ts_sc_comp *const ts_sc, const uint32_t ts, const uint16_t sn)
Store the new TS, calculate new values and update the state.
Definition: comp_scaled_rtp_ts.c:90
void * trace_callback_priv
Definition: comp_scaled_rtp_ts.h:104
ROHC definitions for traces.
uint32_t ts_stride
The TS_STRIDE value.
Definition: comp_scaled_rtp_ts.h:66
size_t nr_init_stride_packets
The number of packets sent in state INIT_STRIDE.
Definition: comp_scaled_rtp_ts.h:96
uint16_t old_sn
The previous sequence number.
Definition: comp_scaled_rtp_ts.h:86
uint32_t ts_delta
The difference between old and current TS.
Definition: comp_scaled_rtp_ts.h:99
Initialization state (TS_STRIDE value not yet computed)
Definition: comp_scaled_rtp_ts.h:49