ROHC compression/decompression library
|
Scaled RTP Timestamp decoding. More...
Go to the source code of this file.
Data Structures | |
struct | ts_sc_decomp |
Scaled RTP Timestamp decoding object. More... | |
Functions | |
void | d_create_sc (struct ts_sc_decomp *const ts_sc) |
Create the ts_sc_decomp object. | |
void | ts_update_context (struct ts_sc_decomp *const ts_sc, const uint32_t ts, const uint16_t sn) |
Store a new timestamp. | |
void | d_record_ts_stride (struct ts_sc_decomp *const ts_sc, const uint32_t ts_stride) |
Store the newly-parsed TS_STRIDE value. | |
int | ts_decode_scaled (struct ts_sc_decomp *const ts_sc, const uint32_t ts_scaled, const size_t bits_nr, uint32_t *const decoded_ts) |
Decode timestamp (TS) value with TS_SCALED value. | |
uint32_t | ts_decode_unscaled (struct ts_sc_decomp *const ts_sc, const uint32_t ts_bits) |
Decode timestamp (TS) value with unscaled value. | |
uint32_t | ts_deduce_from_sn (struct ts_sc_decomp *const ts_sc, const uint16_t sn) |
Deduct timestamp (TS) from Sequence Number (SN) |
Scaled RTP Timestamp decoding.
void d_create_sc | ( | struct ts_sc_decomp *const | ts_sc | ) |
Create the ts_sc_decomp object.
ts_sc | The ts_sc_decomp object to create |
References d_lsb_init(), ts_sc_decomp::lsb_ts_scaled, ts_sc_decomp::new_ts_offset, ts_sc_decomp::new_ts_scaled, ts_sc_decomp::new_ts_stride, ts_sc_decomp::old_sn, ts_sc_decomp::old_ts, ts_sc_decomp::sn, ts_sc_decomp::ts, ts_sc_decomp::ts_offset, ts_sc_decomp::ts_scaled, and ts_sc_decomp::ts_stride.
Referenced by d_rtp_create().
void d_record_ts_stride | ( | struct ts_sc_decomp *const | ts_sc, |
const uint32_t | ts_stride | ||
) |
Store the newly-parsed TS_STRIDE value.
ts_sc | The ts_sc_decomp object |
ts_stride | The TS_STRIDE value to add |
References ts_sc_decomp::new_ts_stride, and rohc_debugf.
Referenced by decode_extension3(), and rtp_decode_dynamic_rtp().
int ts_decode_scaled | ( | struct ts_sc_decomp *const | ts_sc, |
const uint32_t | ts_scaled, | ||
const size_t | bits_nr, | ||
uint32_t *const | decoded_ts | ||
) |
Decode timestamp (TS) value with TS_SCALED value.
Use the given TS and TS_SCALED bits. Use the TS_STRIDE and TS_OFFSET values found in context.
ts_sc | The ts_sc_decomp object |
ts_scaled | The W-LSB-encoded TS_SCALED value |
bits_nr | The number of bits of TS_SCALED (W-LSB) |
decoded_ts | OUT: The decoded TS |
References d_get_lsb_ref(), d_lsb_decode32(), ts_sc_decomp::lsb_ts_scaled, ts_sc_decomp::new_ts_offset, ts_sc_decomp::new_ts_scaled, ts_sc_decomp::new_ts_stride, rohc_debugf, ts_sc_decomp::ts_offset, and ts_sc_decomp::ts_stride.
Referenced by decode_uo1(), and decode_uor2().
uint32_t ts_decode_unscaled | ( | struct ts_sc_decomp *const | ts_sc, |
const uint32_t | ts_bits | ||
) |
Decode timestamp (TS) value with unscaled value.
Use the given unscaled TS bits. If the TS_STRIDE value was updated by the current packet, compute new TS_SCALED and TS_OFFSET values from the new TS_STRIDE value.
ts_sc | The ts_sc_decomp object |
ts_bits | The unscaled TS bits |
References ts_sc_decomp::new_ts_offset, ts_sc_decomp::new_ts_scaled, ts_sc_decomp::new_ts_stride, rohc_debugf, and ts_sc_decomp::ts_stride.
Referenced by decode_uo1(), decode_uor2(), and rtp_decode_dynamic_rtp().
uint32_t ts_deduce_from_sn | ( | struct ts_sc_decomp *const | ts_sc, |
const uint16_t | sn | ||
) |
Deduct timestamp (TS) from Sequence Number (SN)
Use the given SN bits to compute the new TS_SCALED value. Use the TS_STRIDE and TS_OFFSET values found in context.
ts_sc | The ts_sc_decomp object |
sn | The SN |
References ts_sc_decomp::new_ts_offset, ts_sc_decomp::new_ts_scaled, ts_sc_decomp::new_ts_stride, rohc_debugf, ts_sc_decomp::sn, ts_sc_decomp::ts_offset, ts_sc_decomp::ts_scaled, and ts_sc_decomp::ts_stride.
Referenced by decode_uo0(), decode_uo1(), and decode_uor2().
void ts_update_context | ( | struct ts_sc_decomp *const | ts_sc, |
const uint32_t | ts, | ||
const uint16_t | sn | ||
) |
Store a new timestamp.
ts_sc | The ts_sc_decomp object |
ts | The new decoded TimeStamp (TS) |
sn | The new decoded Sequence Number (SN) |
References d_lsb_sync_ref(), d_lsb_update(), ts_sc_decomp::lsb_ts_scaled, ts_sc_decomp::new_ts_offset, ts_sc_decomp::new_ts_scaled, ts_sc_decomp::new_ts_stride, ts_sc_decomp::old_sn, ts_sc_decomp::old_ts, rohc_debugf, ts_sc_decomp::sn, sn, ts_sc_decomp::ts, ts_sc_decomp::ts_offset, ts_sc_decomp::ts_scaled, and ts_sc_decomp::ts_stride.
Referenced by decode_uo0(), decode_uo1(), decode_uor2(), and rtp_decode_dynamic_rtp().