Scaled RTP Timestamp encoding.
More...
#include "wlsb.h"
#include "rohc_traces.h"
#include <stdbool.h>
#include "dllexport.h"
#include "config.h"
Go to the source code of this file.
Data Structures |
struct | ts_sc_comp |
| Scaled RTP Timestamp encoding object. More...
|
Enumerations |
enum | ts_sc_state { INIT_TS = 1,
INIT_STRIDE = 2,
SEND_SCALED = 3
} |
| State of scaled RTP Timestamp encoding. More...
|
Functions |
bool ROHC_EXPORT | c_create_sc (struct ts_sc_comp *const ts_sc, const size_t wlsb_window_width, rohc_trace_callback_t trace_cb, rohc_trace_callback2_t trace_cb2, void *const trace_cb_priv) |
| Create the ts_sc_comp object.
|
void ROHC_EXPORT | c_destroy_sc (struct ts_sc_comp *const ts_sc) |
| Destroy the ts_sc_comp object.
|
void ROHC_EXPORT | 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.
|
bool ROHC_EXPORT | nb_bits_unscaled (const struct ts_sc_comp *const ts_sc, size_t *const bits_nr) |
| Return the number of bits needed to encode unscaled TS.
|
void ROHC_EXPORT | add_unscaled (const struct ts_sc_comp *const ts_sc, const uint16_t sn) |
| Add a new unscaled TS value to the ts_sc_comp object.
|
bool ROHC_EXPORT | nb_bits_scaled (const struct ts_sc_comp *const ts_sc, size_t *const bits_nr) |
| Return the number of bits needed to encode TS_SCALED.
|
void ROHC_EXPORT | add_scaled (const struct ts_sc_comp *const ts_sc, const uint16_t sn) |
| Add a new TS_SCALED value to the ts_sc_comp object.
|
uint32_t ROHC_EXPORT | get_ts_stride (const struct ts_sc_comp *const ts_sc) |
| Return the TS_STRIDE value.
|
uint32_t ROHC_EXPORT | get_ts_scaled (const struct ts_sc_comp *const ts_sc) |
| Return the TS_SCALED value.
|
uint32_t ROHC_EXPORT | get_ts_unscaled (const struct ts_sc_comp *const ts_sc) |
| Return the unscaled TS value.
|
bool ROHC_EXPORT | 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.
|
Detailed Description
Scaled RTP Timestamp encoding.
- Author:
- David Moreau from TAS
-
Didier Barvaux <didier.barvaux@toulouse.viveris.com>
-
Didier Barvaux <didier@barvaux.org>
See section 4.5.3 of RFC 3095 for details about Scaled RTP Timestamp encoding.
Enumeration Type Documentation
State of scaled RTP Timestamp encoding.
See section 4.5.3 of RFC 3095 for details about Scaled RTP Timestamp encoding.
- Enumerator:
INIT_TS |
Initialization state (TS_STRIDE value not yet computed)
|
INIT_STRIDE |
Initialization state (TS_STRIDE value computed and sent)
|
SEND_SCALED |
Compression state (TS_SCALED value computed and sent)
|
Function Documentation
Add a new TS_SCALED value to the ts_sc_comp object.
- Parameters:
-
Add a new unscaled TS value to the ts_sc_comp object.
- Parameters:
-
Store the new TS, calculate new values and update the state.
- Parameters:
-
ts_sc | The ts_sc_comp object |
ts | The timestamp to add |
sn | The sequence number of the RTP packet |
Create the ts_sc_comp object.
- Parameters:
-
ts_sc | The ts_sc_comp object to create |
wlsb_window_width | The width of the W-LSB sliding window to use for TS_STRIDE (must be > 0) |
trace_cb | The old trace callback |
trace_cb2 | The new trace callback |
trace_cb_priv | An optional private context for the trace callback, may be NULL |
- Returns:
- true if creation is successful, false otherwise
Return the TS_SCALED value.
- Parameters:
-
- Returns:
- The TS_SCALED value
Return the TS_STRIDE value.
- Parameters:
-
- Returns:
- TS_STRIDE value
Return the unscaled TS value.
- Parameters:
-
- Returns:
- The unscaled TS value
Return the number of bits needed to encode TS_SCALED.
- Parameters:
-
ts_sc | The ts_sc_comp object |
bits_nr | OUT: The number of bits needed |
- Returns:
- true in case of success, false if the minimal number of bits can not be found
Return the number of bits needed to encode unscaled TS.
- Parameters:
-
ts_sc | The ts_sc_comp object |
bits_nr | OUT: The number of bits needed |
- Returns:
- true in case of success, false if the minimal number of bits can not be found
Whether TimeStamp (TS) is deducible from the Sequence Number (SN) or not.
- Parameters:
-
ts_sc | The TS SCALED compression context |
- Returns:
- true if TS is deducible from SN, false otherwise