ROHC compression/decompression library
|
00001 /* 00002 * This program is free software; you can redistribute it and/or modify 00003 * it under the terms of the GNU General Public License as published by 00004 * the Free Software Foundation; either version 2 of the License, or 00005 * (at your option) any later version. 00006 * 00007 * This program is distributed in the hope that it will be useful, 00008 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00009 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00010 * GNU General Public License for more details. 00011 * 00012 * You should have received a copy of the GNU General Public License 00013 * along with this program; if not, write to the Free Software 00014 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00015 */ 00016 00017 /** 00018 * @file ts_sc_decomp.h 00019 * @brief Scaled RTP Timestamp decoding 00020 * @author David Moreau from TAS 00021 * @author Didier Barvaux <didier@barvaux.org> 00022 */ 00023 00024 #ifndef TS_SC_DECOMP_H 00025 #define TS_SC_DECOMP_H 00026 00027 #include "lsb_decode.h" 00028 #include "rohc_traces.h" 00029 00030 #include <stdint.h> 00031 #ifdef __KERNEL__ 00032 # include <linux/types.h> 00033 #else 00034 # include <stdbool.h> 00035 #endif 00036 00037 #include "dllexport.h" 00038 00039 00040 /* The definition of the scaled RTP Timestamp decoding context is private */ 00041 struct ts_sc_decomp; 00042 00043 00044 /* 00045 * Function prototypes 00046 */ 00047 00048 struct ts_sc_decomp * ROHC_EXPORT d_create_sc(rohc_trace_callback_t callback); 00049 void ROHC_EXPORT rohc_ts_scaled_free(struct ts_sc_decomp *const ts_scaled) 00050 __attribute__((nonnull(1))); 00051 00052 void ROHC_EXPORT ts_update_context(struct ts_sc_decomp *const ts_sc, 00053 const uint32_t ts, 00054 const uint16_t sn); 00055 00056 void ROHC_EXPORT d_record_ts_stride(struct ts_sc_decomp *const ts_sc, 00057 const uint32_t ts_stride); 00058 00059 bool ROHC_EXPORT ts_decode_scaled(struct ts_sc_decomp *const ts_sc, 00060 const uint32_t ts_scaled, 00061 const size_t bits_nr, 00062 uint32_t *const decoded_ts); 00063 00064 uint32_t ROHC_EXPORT ts_decode_unscaled(struct ts_sc_decomp *const ts_sc, 00065 const uint32_t ts_bits); 00066 00067 uint32_t ROHC_EXPORT ts_deduce_from_sn(struct ts_sc_decomp *const ts_sc, 00068 const uint16_t sn); 00069 00070 #endif 00071