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 "dllexport.h" 00029 00030 #include <stdint.h> 00031 #include <stdbool.h> 00032 00033 00034 /* The definition of the scaled RTP Timestamp decoding context is private */ 00035 struct ts_sc_decomp; 00036 00037 00038 /* 00039 * Function prototypes 00040 */ 00041 00042 struct ts_sc_decomp * ROHC_EXPORT d_create_sc(void); 00043 void ROHC_EXPORT rohc_ts_scaled_free(struct ts_sc_decomp *const ts_scaled) 00044 __attribute__((nonnull(1))); 00045 00046 void ROHC_EXPORT ts_update_context(struct ts_sc_decomp *const ts_sc, 00047 const uint32_t ts, 00048 const uint16_t sn); 00049 00050 void ROHC_EXPORT d_record_ts_stride(struct ts_sc_decomp *const ts_sc, 00051 const uint32_t ts_stride); 00052 00053 bool ROHC_EXPORT ts_decode_scaled(struct ts_sc_decomp *const ts_sc, 00054 const uint32_t ts_scaled, 00055 const size_t bits_nr, 00056 uint32_t *const decoded_ts); 00057 00058 uint32_t ROHC_EXPORT ts_decode_unscaled(struct ts_sc_decomp *const ts_sc, 00059 const uint32_t ts_bits); 00060 00061 uint32_t ROHC_EXPORT ts_deduce_from_sn(struct ts_sc_decomp *const ts_sc, 00062 const uint16_t sn); 00063 00064 #endif 00065