ROHC compression/decompression library
|
Scaled RTP Timestamp encoding. More...
Functions | |
int | c_create_sc (struct ts_sc_comp *ts_sc) |
Create the ts_sc_comp object. | |
void | c_destroy_sc (struct ts_sc_comp *ts_sc) |
Destroy the ts_sc_comp object. | |
void | c_add_ts (struct ts_sc_comp *ts_sc, unsigned int ts, unsigned int sn) |
Store the new TS, calculate new values and update the state. | |
int | nb_bits_scaled (struct ts_sc_comp ts_sc) |
Return the number of bits needed to encode TS_SCALED. | |
void | add_scaled (struct ts_sc_comp *ts_sc, int sn) |
Add a new TS_SCALED value to the ts_sc_comp object. | |
int | get_ts_scaled (struct ts_sc_comp ts_sc) |
Return the TS_SCALED value. | |
int | get_offset (struct ts_sc_comp ts_sc) |
Return the TS_OFFSET value. | |
int | get_ts_stride (struct ts_sc_comp ts_sc) |
Return the TS_STRIDE value. | |
int | is_deductible (struct ts_sc_comp ts_sc) |
Whether TimeStamp (TS) is deductible from the Sequence Number (SN) or not. | |
int | is_ts_constant (struct ts_sc_comp ts_sc) |
Whether TimeStamp (TS) did not change or not. |
Scaled RTP Timestamp encoding.
void add_scaled | ( | struct ts_sc_comp * | ts_sc, |
int | sn | ||
) |
Add a new TS_SCALED value to the ts_sc_comp object.
ts_sc | The ts_sc_comp object |
sn | The Sequence Number |
References c_add_wlsb(), ts_sc_comp::scaled_window, and ts_sc_comp::ts_scaled.
Referenced by update_variables().
void c_add_ts | ( | struct ts_sc_comp * | ts_sc, |
unsigned int | ts, | ||
unsigned int | sn | ||
) |
Store the new TS, calculate new values and update the state.
ts_sc | The ts_sc_comp object |
ts | The timestamp to add |
sn | The sequence number of the RTP packet |
References INIT_STRIDE, INIT_TS, ts_sc_comp::is_deductible, ts_sc_comp::old_sn, ts_sc_comp::old_ts, rohc_debugf, sdvl_can_value_be_encoded(), SEND_SCALED, ts_sc_comp::sn, sn, ts_sc_comp::state, ts_sc_comp::ts, ts_sc_comp::ts_delta, ts_sc_comp::ts_offset, ts_sc_comp::ts_scaled, and ts_sc_comp::ts_stride.
Referenced by c_generic_encode().
int c_create_sc | ( | struct ts_sc_comp * | ts_sc | ) |
Create the ts_sc_comp object.
ts_sc | The ts_sc_comp object to create |
References c_create_wlsb(), INIT_TS, ts_sc_comp::is_deductible, ts_sc_comp::old_sn, ts_sc_comp::old_ts, rohc_debugf, ts_sc_comp::scaled_window, ts_sc_comp::sn, ts_sc_comp::state, ts_sc_comp::ts, ts_sc_comp::ts_delta, ts_sc_comp::ts_offset, ts_sc_comp::ts_scaled, and ts_sc_comp::ts_stride.
Referenced by c_rtp_create().
void c_destroy_sc | ( | struct ts_sc_comp * | ts_sc | ) |
Destroy the ts_sc_comp object.
ts_sc | The ts_sc_comp object to destroy |
References c_destroy_wlsb(), and ts_sc_comp::scaled_window.
Referenced by c_rtp_destroy().
int get_offset | ( | struct ts_sc_comp | ts_sc | ) |
Return the TS_OFFSET value.
ts_sc | The ts_sc_comp object |
References ts_sc_comp::ts_offset.
int get_ts_scaled | ( | struct ts_sc_comp | ts_sc | ) |
Return the TS_SCALED value.
ts_sc | The ts_sc_comp object |
References ts_sc_comp::ts_scaled.
Referenced by update_variables().
int get_ts_stride | ( | struct ts_sc_comp | ts_sc | ) |
Return the TS_STRIDE value.
ts_sc | The ts_sc_comp object |
References ts_sc_comp::ts_stride.
Referenced by rtp_code_dynamic_rtp_part(), and rtp_header_flags_and_fields().
int is_deductible | ( | struct ts_sc_comp | ts_sc | ) |
Whether TimeStamp (TS) is deductible from the Sequence Number (SN) or not.
ts_sc | The ts_sc_comp object |
References ts_sc_comp::is_deductible.
Referenced by code_EXT3_packet(), code_UOR2_ID_bytes(), decide_extension(), and decide_SO_packet().
int is_ts_constant | ( | struct ts_sc_comp | ts_sc | ) |
Whether TimeStamp (TS) did not change or not.
ts_sc | The ts_sc_comp object |
References ts_sc_comp::ts_delta.
Referenced by code_EXT3_packet(), rtp_code_dynamic_rtp_part(), and rtp_decide_state().
int nb_bits_scaled | ( | struct ts_sc_comp | ts_sc | ) |
Return the number of bits needed to encode TS_SCALED.
ts_sc | The ts_sc_comp object |
References c_get_k_wlsb(), ts_sc_comp::scaled_window, and ts_sc_comp::ts_scaled.
Referenced by update_variables().