ROHC compression/decompression library
|
00001 /* 00002 * Copyright 2007,2008 CNES 00003 * Copyright 2011,2012,2013 Didier Barvaux 00004 * Copyright 2007,2008 Thales Alenia Space 00005 * Copyright 2007,2010,2012,2013,2014 Viveris Technologies 00006 * 00007 * This library is free software; you can redistribute it and/or 00008 * modify it under the terms of the GNU Lesser General Public 00009 * License as published by the Free Software Foundation; either 00010 * version 2.1 of the License, or (at your option) any later version. 00011 * 00012 * This library is distributed in the hope that it will be useful, 00013 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00014 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00015 * Lesser General Public License for more details. 00016 * 00017 * You should have received a copy of the GNU Lesser General Public 00018 * License along with this library; if not, write to the Free Software 00019 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 00020 */ 00021 00022 /** 00023 * @file decomp/schemes/scaled_rtp_ts.h 00024 * @brief Scaled RTP Timestamp decoding 00025 * @author David Moreau from TAS 00026 * @author Didier Barvaux <didier@barvaux.org> 00027 */ 00028 00029 #ifndef ROHC_DECOMP_SCHEMES_SCALED_RTP_TS_H 00030 #define ROHC_DECOMP_SCHEMES_SCALED_RTP_TS_H 00031 00032 #include "rohc_traces.h" 00033 00034 #include <stdlib.h> 00035 #include <stdint.h> 00036 #ifdef __KERNEL__ 00037 # include <linux/types.h> 00038 #else 00039 # include <stdbool.h> 00040 #endif 00041 00042 #include "dllexport.h" 00043 00044 #include "config.h" /* for ROHC_ENABLE_DEPRECATED_API */ 00045 00046 00047 /* The definition of the scaled RTP Timestamp decoding context is private */ 00048 struct ts_sc_decomp; 00049 00050 00051 /* 00052 * Function prototypes 00053 */ 00054 00055 struct ts_sc_decomp * ROHC_EXPORT d_create_sc( 00056 #if !defined(ROHC_ENABLE_DEPRECATED_API) || ROHC_ENABLE_DEPRECATED_API == 1 00057 rohc_trace_callback_t trace_cb, 00058 #endif 00059 rohc_trace_callback2_t trace_cb2, 00060 void *const trace_cb_priv) 00061 __attribute__((warn_unused_result)); 00062 void ROHC_EXPORT rohc_ts_scaled_free(struct ts_sc_decomp *const ts_scaled); 00063 00064 void ROHC_EXPORT ts_update_context(struct ts_sc_decomp *const ts_sc, 00065 const uint32_t ts, 00066 const uint16_t sn); 00067 00068 void ROHC_EXPORT d_record_ts_stride(struct ts_sc_decomp *const ts_sc, 00069 const uint32_t ts_stride); 00070 00071 bool ROHC_EXPORT ts_decode_unscaled_bits(struct ts_sc_decomp *const ts_sc, 00072 const uint32_t ts_unscaled_bits, 00073 const size_t ts_unscaled_bits_nr, 00074 uint32_t *const decoded_ts, 00075 const bool compat_1_6_x) 00076 __attribute__((warn_unused_result)); 00077 00078 bool ROHC_EXPORT ts_decode_scaled_bits(struct ts_sc_decomp *const ts_sc, 00079 const uint32_t ts_scaled_bits, 00080 const size_t ts_scaled_bits_nr, 00081 uint32_t *const decoded_ts) 00082 __attribute__((warn_unused_result)); 00083 00084 uint32_t ROHC_EXPORT ts_deduce_from_sn(struct ts_sc_decomp *const ts_sc, 00085 const uint16_t sn) 00086 __attribute__((warn_unused_result)); 00087 00088 #endif 00089