Scaled RTP Timestamp decoding.  
More...
#include "rohc_traces.h"
#include "decomp_wlsb.h"
#include <stdlib.h>
#include <stdint.h>
#include <stdbool.h>
 
Go to the source code of this file.
 | 
| void  | d_init_sc (struct ts_sc_decomp *const ts_scaled, rohc_trace_callback2_t trace_cb, void *const trace_cb_priv) | 
|   | Initialize the scaled RTP Timestamp decoding context.  More...
  | 
|   | 
| void  | ts_update_context (struct ts_sc_decomp *const ts_sc, const uint32_t ts, const uint16_t sn) | 
|   | Store a new timestamp.  More...
  | 
|   | 
| void  | d_record_ts_stride (struct ts_sc_decomp *const ts_sc, const uint32_t ts_stride) | 
|   | Store the newly-parsed TS_STRIDE value.  More...
  | 
|   | 
| bool  | ts_decode_unscaled_bits (struct ts_sc_decomp *const ts_sc, const uint32_t ts_unscaled_bits, const size_t ts_unscaled_bits_nr, uint32_t *const decoded_ts) | 
|   | Decode timestamp (TS) value with some LSB bits of the unscaled value.  More...
  | 
|   | 
| bool  | ts_decode_scaled_bits (struct ts_sc_decomp *const ts_sc, const uint32_t ts_scaled_bits, const size_t ts_scaled_bits_nr, uint32_t *const decoded_ts) | 
|   | Decode timestamp (TS) value with some LSB bits of the TS_SCALED value.  More...
  | 
|   | 
| uint32_t  | ts_deduce_from_sn (struct ts_sc_decomp *const ts_sc, const uint16_t sn) | 
|   | Deduct timestamp (TS) from Sequence Number (SN)  More...
  | 
|   | 
Scaled RTP Timestamp decoding. 
- Author
 - David Moreau from TAS 
 
- 
Didier Barvaux didie.nosp@m.r@ba.nosp@m.rvaux.nosp@m..org 
 
 
◆ d_init_sc()
Initialize the scaled RTP Timestamp decoding context. 
- Parameters
 - 
  
    | [in,out] | ts_scaled | The scaled RTP Timestamp decoding context to init  | 
     | trace_cb | The trace callback  | 
     | trace_cb_priv | An optional private context for the trace  | 
  
   
 
 
◆ d_record_ts_stride()
      
        
          | void d_record_ts_stride  | 
          ( | 
          struct ts_sc_decomp *const  | 
          ts_sc,  | 
        
        
           | 
           | 
          const uint32_t  | 
          ts_stride  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
Store the newly-parsed TS_STRIDE value. 
- Parameters
 - 
  
    | ts_sc | The ts_sc_decomp object  | 
    | ts_stride | The TS_STRIDE value to add  | 
  
   
 
 
◆ ts_decode_scaled_bits()
      
        
          | bool ts_decode_scaled_bits  | 
          ( | 
          struct ts_sc_decomp *const  | 
          ts_sc,  | 
        
        
           | 
           | 
          const uint32_t  | 
          ts_scaled_bits,  | 
        
        
           | 
           | 
          const size_t  | 
          ts_scaled_bits_nr,  | 
        
        
           | 
           | 
          uint32_t *const  | 
          decoded_ts  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
Decode timestamp (TS) value with some LSB bits of the TS_SCALED value. 
Use the given TS and TS_SCALED bits. Use the TS_STRIDE and TS_OFFSET values found in context.
- Parameters
 - 
  
    | ts_sc | The ts_sc_decomp object  | 
    | ts_scaled_bits | The W-LSB-encoded TS_SCALED value  | 
    | ts_scaled_bits_nr | The number of bits of TS_SCALED (W-LSB)  | 
    | decoded_ts | OUT: The decoded TS  | 
  
   
- Returns
 - true in case of success, false otherwise 
 
 
 
◆ ts_decode_unscaled_bits()
      
        
          | bool ts_decode_unscaled_bits  | 
          ( | 
          struct ts_sc_decomp *const  | 
          ts_sc,  | 
        
        
           | 
           | 
          const uint32_t  | 
          ts_unscaled_bits,  | 
        
        
           | 
           | 
          const size_t  | 
          ts_unscaled_bits_nr,  | 
        
        
           | 
           | 
          uint32_t *const  | 
          decoded_ts  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
Decode timestamp (TS) value with some LSB bits of the 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.
- Parameters
 - 
  
    | ts_sc | The ts_sc_decomp object  | 
    | ts_unscaled_bits | The W-LSB-encoded TS value  | 
    | ts_unscaled_bits_nr | The number of bits of TS_SCALED (W-LSB)  | 
    | decoded_ts | OUT: The decoded TS  | 
  
   
- Returns
 - true in case of success, false otherwise 
 
 
 
◆ ts_deduce_from_sn()
      
        
          | 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.
- Parameters
 - 
  
  
 
- Returns
 - The decoded TS 
 
 
 
◆ ts_update_context()
      
        
          | void ts_update_context  | 
          ( | 
          struct ts_sc_decomp *const  | 
          ts_sc,  | 
        
        
           | 
           | 
          const uint32_t  | 
          ts,  | 
        
        
           | 
           | 
          const uint16_t  | 
          sn  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
Store a new timestamp. 
- Parameters
 - 
  
    | ts_sc | The ts_sc_decomp object  | 
    | ts | The new decoded TimeStamp (TS)  | 
    | sn | The new decoded Sequence Number (SN)  |