Commit 79c47725 authored by Guillaume BIENKOWSKI's avatar Guillaume BIENKOWSKI

Progress commit, the decoder/encoder is now working under mediastream.

Server command: mediastream --local 4567 --remote localhost:7894 --payload audio/iSAC/16000 --bitrate 32000
Client command: mediastream --local 7894 --remote localhost:4567 --payload audio/iSAC/16000 --bitrate 32000
parent 646009c2
...@@ -10,3 +10,10 @@ config.status ...@@ -10,3 +10,10 @@ config.status
configure configure
libtool libtool
sdk/webrtc sdk/webrtc
*.lo
.libs/
build/
*.la
msisac.iss
m4/
...@@ -6,6 +6,7 @@ SUBDIRS = sdk ...@@ -6,6 +6,7 @@ SUBDIRS = sdk
# ISAC_FLAVOUR = main # use 'main' or 'fix' # ISAC_FLAVOUR = main # use 'main' or 'fix'
ISAC_SRC_DIR = sdk/webrtc/modules/audio_coding/codecs/isac/$(ISAC_FLAVOUR) ISAC_SRC_DIR = sdk/webrtc/modules/audio_coding/codecs/isac/$(ISAC_FLAVOUR)
ISAC_COMMON_DIR = sdk/webrtc/common_audio/signal_processing
pluginsdir = $(libdir)/mediastreamer/plugins pluginsdir = $(libdir)/mediastreamer/plugins
...@@ -30,7 +31,7 @@ ISAC_BASE_SRCS = $(ISAC_SRC_DIR)/source/fft.c \ ...@@ -30,7 +31,7 @@ ISAC_BASE_SRCS = $(ISAC_SRC_DIR)/source/fft.c \
$(ISAC_SRC_DIR)/source/pitch_gain_tables.c \ $(ISAC_SRC_DIR)/source/pitch_gain_tables.c \
$(ISAC_SRC_DIR)/source/pitch_lag_tables.c \ $(ISAC_SRC_DIR)/source/pitch_lag_tables.c \
$(ISAC_SRC_DIR)/source/spectrum_ar_model_tables.c \ $(ISAC_SRC_DIR)/source/spectrum_ar_model_tables.c \
$(ISAC_SRC_DIR)/source/transform.c $(ISAC_SRC_DIR)/source/transform.c
# some files are implementation specific # some files are implementation specific
...@@ -57,7 +58,43 @@ ISAC_BASE_SRCS += $(ISAC_SRC_DIR)/source/decode_plc.c \ ...@@ -57,7 +58,43 @@ ISAC_BASE_SRCS += $(ISAC_SRC_DIR)/source/decode_plc.c \
$(ISAC_SRC_DIR)/source/isacfix.c \ $(ISAC_SRC_DIR)/source/isacfix.c \
$(ISAC_SRC_DIR)/source/lattice_c.c \ $(ISAC_SRC_DIR)/source/lattice_c.c \
$(ISAC_SRC_DIR)/source/pitch_filter_c.c \ $(ISAC_SRC_DIR)/source/pitch_filter_c.c \
$(ISAC_SRC_DIR)/source/lpc_masking_model.c $(ISAC_SRC_DIR)/source/lpc_masking_model.c \
$(ISAC_COMMON_DIR)/spl_sqrt.c \
$(ISAC_COMMON_DIR)/real_fft.c \
$(ISAC_COMMON_DIR)/filter_ar_fast_q12.c \
$(ISAC_COMMON_DIR)/webrtc_fft_t_1024_8.c \
$(ISAC_COMMON_DIR)/complex_bit_reverse.c \
$(ISAC_COMMON_DIR)/spl_init.c \
$(ISAC_COMMON_DIR)/splitting_filter.c \
$(ISAC_COMMON_DIR)/spl_sqrt_floor.c \
$(ISAC_COMMON_DIR)/levinson_durbin.c \
$(ISAC_COMMON_DIR)/filter_ar.c \
$(ISAC_COMMON_DIR)/get_scaling_square.c \
$(ISAC_COMMON_DIR)/resample_fractional.c \
$(ISAC_COMMON_DIR)/resample.c \
$(ISAC_COMMON_DIR)/downsample_fast.c \
$(ISAC_COMMON_DIR)/filter_ma_fast_q12.c \
$(ISAC_COMMON_DIR)/auto_corr_to_refl_coef.c \
$(ISAC_COMMON_DIR)/auto_correlation.c \
$(ISAC_COMMON_DIR)/refl_coef_to_lpc.c \
$(ISAC_COMMON_DIR)/dot_product_with_scale.c \
$(ISAC_COMMON_DIR)/copy_set_operations.c \
$(ISAC_COMMON_DIR)/spl_version.c \
$(ISAC_COMMON_DIR)/cross_correlation.c \
$(ISAC_COMMON_DIR)/sqrt_of_one_minus_x_squared.c \
$(ISAC_COMMON_DIR)/ilbc_specific_functions.c \
$(ISAC_COMMON_DIR)/resample_by_2.c \
$(ISAC_COMMON_DIR)/complex_fft.c \
$(ISAC_COMMON_DIR)/resample_48khz.c \
$(ISAC_COMMON_DIR)/energy.c \
$(ISAC_COMMON_DIR)/get_hanning_window.c \
$(ISAC_COMMON_DIR)/randomization_functions.c \
$(ISAC_COMMON_DIR)/vector_scaling_operations.c \
$(ISAC_COMMON_DIR)/webrtc_fft_t_rad.c \
$(ISAC_COMMON_DIR)/resample_by_2_internal.c \
$(ISAC_COMMON_DIR)/lpc_to_refl_coef.c \
$(ISAC_COMMON_DIR)/min_max_operations.c \
$(ISAC_COMMON_DIR)/division_operations.c
# TODO: use assembly-optimized versions when possible # TODO: use assembly-optimized versions when possible
# $(ISAC_SRC_DIR)/source/filters_neon.c \ # $(ISAC_SRC_DIR)/source/filters_neon.c \
......
...@@ -75,7 +75,6 @@ LT_INIT([disable-static]) ...@@ -75,7 +75,6 @@ LT_INIT([disable-static])
# check for libraries that have pkg-config files installed # check for libraries that have pkg-config files installed
PKG_CHECK_MODULES(MEDIASTREAMER, mediastreamer >= 2.0.0) PKG_CHECK_MODULES(MEDIASTREAMER, mediastreamer >= 2.0.0)
# Checks for libraries. # Checks for libraries.
# AC_CHECK_LIB([m],[cosf]) # AC_CHECK_LIB([m],[cosf])
...@@ -83,9 +82,22 @@ PKG_CHECK_MODULES(MEDIASTREAMER, mediastreamer >= 2.0.0) ...@@ -83,9 +82,22 @@ PKG_CHECK_MODULES(MEDIASTREAMER, mediastreamer >= 2.0.0)
AC_LIBTOOL_WIN32_DLL AC_LIBTOOL_WIN32_DLL
LT_INIT([disable-static]) LT_INIT([disable-static])
# enable to debug cross-compilation
# AC_MSG_NOTICE([Target OS: $target_os])
case $target_os in case $target_os in
*mingw*) *mingw*)
mingw_found=yes mingw_found=yes
CFLAGS="$CFLAGS -DWEBRTC_WIN"
;;
*linux*)
CFLAGS="$CFLAGS -DWEBRTC_LINUX -DWEBRTC_THREAD_RR"
;;
*mac*)
CFLAGS="$CFLAGS -DWEBRTC_MAC -DWEBRTC_THREAD_RR -DWEBRTC_CLOCK_TYPE_REALTIME"
;;
*android*)
CFLAGS="$CFLAGS -DWEBRTC_LINUX -DWEBRTC_ANDROID -DWEBRTC_THREAD_RR -DWEBRTC_CLOCK_TYPE_REALTIME"
;; ;;
esac esac
......
...@@ -17,11 +17,7 @@ ...@@ -17,11 +17,7 @@
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/ */
#ifdef ISAC_FLAVOUR_MAIN
#include "isac.h"
#else
#include "isacfix.h" #include "isacfix.h"
#endif
#include "mediastreamer2/mscodecutils.h" #include "mediastreamer2/mscodecutils.h"
#include "mediastreamer2/msfilter.h" #include "mediastreamer2/msfilter.h"
...@@ -30,48 +26,170 @@ ...@@ -30,48 +26,170 @@
#include <stdint.h> #include <stdint.h>
/*filter common method*/
struct _isac_decoder_struct_t {
ISACFIX_MainStruct* isac;
MSConcealerContext* plc_ctx;
unsigned short int seq_nb;
unsigned int ptime;
};
typedef struct _isac_decoder_struct_t isac_decoder_t;
static void filter_init(MSFilter *f){ static void filter_init(MSFilter *f){
ISACFIX_MainStruct* isac_mainstruct = NULL;
isac_decoder_t *obj = NULL;
int instance_size;
WebRtc_Word16 ret;
f->data = ms_new0(isac_decoder_t, 1);
obj = (isac_decoder_t*)f->data;
ret = WebRtcIsacfix_AssignSize( &instance_size );
if( ret ) {
ms_error("WebRtcIsacfix_AssignSize returned size %d", instance_size);
}
isac_mainstruct = ms_malloc(instance_size);
ret = WebRtcIsacfix_Assign(&obj->isac, isac_mainstruct);
if( ret ) {
ms_error("WebRtcIsacfix_Create failed (%d)", ret);
}
ret = WebRtcIsacfix_DecoderInit(obj->isac);
if( ret ) {
ms_error("WebRtcIsacfix_DecoderInit failed (%d)", ret);
}
obj->ptime = 30; // default ptime is 30ms per packet
} }
static void filter_preprocess(MSFilter *f){ static void filter_preprocess(MSFilter *f){
isac_decoder_t* obj = (isac_decoder_t*)f->data;
obj->plc_ctx = ms_concealer_context_new(UINT32_MAX);
} }
/**
put im to NULL for PLC
*/
// static void decode(MSFilter *f, mblk_t *im) {
// } static void decode(MSFilter *f, mblk_t *im) {
isac_decoder_t* obj = (isac_decoder_t*)f->data;
WebRtc_Word16 samples_nb, ret;
WebRtc_Word16 speech_type; // needed but not used..
// im is one packet from the encoder, so it's either 30 or 60 ms of audio
ret = WebRtcIsacfix_ReadFrameLen( (const WebRtc_Word16*)im->b_rptr, &samples_nb);
// ms_message("WebRtcIsacfix_ReadFrameLen -> %d", samples_nb);
if( ret == 0 ) {
mblk_t *om = allocb(samples_nb*2, 0);
mblk_meta_copy(im, om);
obj->ptime = (samples_nb == 480) ? 30 : 60; // update ptime
// ms_message("DECODED om datap @%p", om->b_datap);
ret = WebRtcIsacfix_Decode(obj->isac,
(const WebRtc_UWord16*)im->b_rptr,
(im->b_wptr - im->b_rptr),
(WebRtc_Word16*)om->b_wptr,
&speech_type );
if( ret < 0 ) {
ms_error( "WebRtcIsacfix_Decode error: %d", WebRtcIsacfix_GetErrorCode(obj->isac) );
freeb(om);
} else {
// ms_message("Decoded %d samples", ret);
om->b_wptr+= ret*2;
mblk_set_plc_flag(om, (im != NULL)?0:1);
ms_queue_put(f->outputs[0], om);
}
} else {
ms_error( "WebRtcIsacfix_ReadFrameLen failed: %d", WebRtcIsacfix_GetErrorCode(obj->isac) );
}
obj->seq_nb = mblk_get_cseq(im);
ms_concealer_inc_sample_time(obj->plc_ctx, f->ticker->time, obj->ptime, TRUE);
return;
}
static void filter_process(MSFilter *f){ static void filter_process(MSFilter *f){
isac_decoder_t* obj = (isac_decoder_t*)f->data;
mblk_t* im;
while(( im= ms_queue_get(f->inputs[0]) ) != NULL ){
decode(f, im);
}
if( ms_concealer_context_is_concealement_required(obj->plc_ctx, f->ticker->time) ) {
WebRtc_Word16 flen = obj->ptime == 30 ? 480 : 960;
mblk_t* plc_blk = allocb(flen*2, 0 );
// ms_message("PLC om datap @%p, nb samples %d", plc_blk->b_datap, flen);
// interpolate 1 frame for 30ms ptime, 2 frames for 60ms
WebRtc_Word16 ret = WebRtcIsacfix_DecodePlc(obj->isac,
(WebRtc_Word16*)plc_blk->b_wptr,
(obj->ptime == 30) ? 1 : 2);
if( ret < 0 ) {
ms_error("WebRtcIsacfix_DecodePlc error: %d", WebRtcIsacfix_GetErrorCode(obj->isac) );
freeb(plc_blk);
} else {
plc_blk->b_wptr += ret*2;
obj->seq_nb++;
// insert this interpolated block into the output, with correct args:
mblk_set_cseq(plc_blk, obj->seq_nb );
mblk_set_plc_flag(plc_blk, 1); // this one's a PLC packet
ms_queue_put(f->outputs[0], plc_blk);
ms_concealer_inc_sample_time(obj->plc_ctx, f->ticker->time, obj->ptime, FALSE);
}
}
} }
static void filter_postprocess(MSFilter *f){ static void filter_postprocess(MSFilter *f){
isac_decoder_t* obj = (isac_decoder_t*)f->data;
ms_concealer_context_destroy(obj->plc_ctx);
obj->plc_ctx = NULL;
} }
static void filter_unit(MSFilter *f){ static void filter_uninit(MSFilter *f){
isac_decoder_t* obj = (isac_decoder_t*)f->data;
ms_free(obj->isac);
ms_free(f->data);
f->data = NULL;
} }
/*filter specific method*/ /*filter specific method*/
static int filter_set_sample_rate(MSFilter *f, void *arg) { static int filter_set_sample_rate(MSFilter *f, void *arg) {
if( *(int*)arg != 16000) {
ms_error("iSAC doesn't support sampling rate %d, only 16000", *(int*)arg);
}
return 0; return 0;
} }
static int filter_get_sample_rate(MSFilter *f, void *arg) { static int filter_get_sample_rate(MSFilter *f, void *arg) {
*(int*)arg = 16000;
return 0; return 0;
} }
static int filter_set_rtp_picker(MSFilter *f, void *arg) {
return 0;
}
static int filter_have_plc(MSFilter *f, void *arg) static int filter_have_plc(MSFilter *f, void *arg)
{ {
*(int*)arg = 1;
return 0; return 0;
} }
static MSFilterMethod filter_methods[]={ static MSFilterMethod filter_methods[]={
{ MS_FILTER_SET_SAMPLE_RATE, filter_set_sample_rate }, { MS_FILTER_SET_SAMPLE_RATE, filter_set_sample_rate },
{ MS_FILTER_GET_SAMPLE_RATE, filter_get_sample_rate }, { MS_FILTER_GET_SAMPLE_RATE, filter_get_sample_rate },
{ MS_FILTER_SET_RTP_PAYLOAD_PICKER, filter_set_rtp_picker },
{ MS_DECODER_HAVE_PLC, filter_have_plc }, { MS_DECODER_HAVE_PLC, filter_have_plc },
{ 0, NULL} { 0, NULL}
}; };
...@@ -92,7 +210,7 @@ MSFilterDesc ms_isac_dec_desc={ ...@@ -92,7 +210,7 @@ MSFilterDesc ms_isac_dec_desc={
filter_preprocess, filter_preprocess,
filter_process, filter_process,
filter_postprocess, filter_postprocess,
filter_unit, filter_uninit,
filter_methods, filter_methods,
MS_FILTER_IS_PUMP MS_FILTER_IS_PUMP
}; };
...@@ -111,7 +229,7 @@ MSFilterDesc ms_isac_dec_desc={ ...@@ -111,7 +229,7 @@ MSFilterDesc ms_isac_dec_desc={
.preprocess=filter_preprocess, .preprocess=filter_preprocess,
.process=filter_process, .process=filter_process,
.postprocess=filter_postprocess, .postprocess=filter_postprocess,
.uninit=filter_unit, .uninit=filter_uninit,
.methods=filter_methods, .methods=filter_methods,
.flags=MS_FILTER_IS_PUMP .flags=MS_FILTER_IS_PUMP
}; };
......
...@@ -17,28 +17,120 @@ ...@@ -17,28 +17,120 @@
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/ */
#ifdef ISAC_FLAVOUR_MAIN
#include "isac.h"
#else
#include "isacfix.h" #include "isacfix.h"
#endif #include "signal_processing_library.h"
#include "mediastreamer2/msfilter.h" #include "mediastreamer2/msfilter.h"
#include "mediastreamer2/mscodecutils.h" #include "mediastreamer2/mscodecutils.h"
/* Define codec specific settings */ /* Define codec specific settings */
#define MAX_BYTES_PER_FRAME 250 // Equals peak bitrate of 100 kbps #define ISAC_SAMPLE_RATE 16000
#define MAX_INPUT_FRAMES 5 #define ISAC_SAMPLES_PER_ENCODE 160 /* (10 / 1000) * SAMPLE_RATE */
/*filter common method*/ /*filter common method*/
struct _isac_encoder_struct_t {
ISACFIX_MainStruct* isac;
MSBufferizer *bufferizer;
unsigned int ptime;
unsigned int totalSize;
};
typedef struct _isac_encoder_struct_t isac_encoder_struct_t;
enum _isac_codingmode {
CODING_AUTOMATIC,
CODING_USERDEFINED
};
static void filter_init ( MSFilter *f ) { static void filter_init ( MSFilter *f ) {
ISACFIX_MainStruct* isac_mainstruct = NULL;
struct _isac_encoder_struct_t *obj = NULL;
int instance_size;
WebRtc_Word16 ret;
f->data = ms_new0(isac_encoder_struct_t, 1);
obj = (isac_encoder_struct_t*)f->data;
ret = WebRtcIsacfix_AssignSize( &instance_size );
if( ret ) {
ms_error("WebRtcIsacfix_AssignSize returned size %d", instance_size);
}
isac_mainstruct = ms_malloc0(instance_size);
ret = WebRtcIsacfix_Assign(&obj->isac, isac_mainstruct);
if( ret ) {
ms_error("WebRtcIsacfix_Create failed (%d)", ret);
}
// TODO: AUTO or USER coding mode?
ret = WebRtcIsacfix_EncoderInit(obj->isac, CODING_AUTOMATIC);
if( ret ) {
ms_error("WebRtcIsacfix_EncoderInit failed (%d)", ret);
}
obj->ptime = 30; // iSAC allows 30 or 60ms per packet
obj->bufferizer = ms_bufferizer_new();
} }
static void filter_preprocess ( MSFilter *f ) { static void filter_preprocess ( MSFilter *f ) {
} }
static void filter_process ( MSFilter *f ) { static void filter_process ( MSFilter *f ) {
isac_encoder_struct_t* obj = (isac_encoder_struct_t*)f->data;
mblk_t *im;
mblk_t *om=NULL;
u_int8_t* input_buf = NULL;
WebRtc_Word16 ret;
// get the input data and put it into our buffered input
while( (im = ms_queue_get( f->inputs[0] ) ) != NULL ) {
ms_bufferizer_put( obj->bufferizer, im );
}
// feed the encoder with 160 16bit samples, until it has reached enough data
// to produce a packet
while( ms_bufferizer_get_avail(obj->bufferizer) > ISAC_SAMPLES_PER_ENCODE*2 ){
om = allocb( WebRtcIsacfix_GetNewFrameLen(obj->isac), 0 );
if(!input_buf) input_buf = ms_malloc( ISAC_SAMPLES_PER_ENCODE*2 );
ms_bufferizer_read(obj->bufferizer, input_buf, ISAC_SAMPLES_PER_ENCODE*2);
ret = WebRtcIsacfix_Encode(obj->isac,
(const WebRtc_Word16*)input_buf,
(WebRtc_Word16*)om->b_wptr);
if( ret < 0) {
ms_error( "WebRtcIsacfix_Encode error: %d", WebRtcIsacfix_GetErrorCode(obj->isac) );
freeb(om);
} else if( ret == 0 ) {
// Encode buffered the input, not yet able to produce a packet, continue feeding it
// 160 samples per-call, if possible
freeb(om);
} else {
// a new packet has been encoded, send it
obj->totalSize += ret;
om->b_wptr += ret;
// ms_message("packet out, size %d", ret);
mblk_set_timestamp_info( om, obj->totalSize );
ms_queue_put(f->outputs[0], om);
om = NULL;
break;
}
}
if( input_buf ){
ms_free(input_buf);
}
} }
static void filter_postprocess ( MSFilter *f ) { static void filter_postprocess ( MSFilter *f ) {
...@@ -46,64 +138,77 @@ static void filter_postprocess ( MSFilter *f ) { ...@@ -46,64 +138,77 @@ static void filter_postprocess ( MSFilter *f ) {
} }
static void filter_uninit ( MSFilter *f ) { static void filter_uninit ( MSFilter *f ) {
struct _isac_encoder_struct_t *encoder = (struct _isac_encoder_struct_t*)f->data;
ms_free(encoder->isac);
ms_bufferizer_destroy(encoder->bufferizer);
ms_free(encoder);
f->data = 0;
} }
/*filter specific method*/ /*filter specific method*/
static int filter_set_sample_rate ( MSFilter *f, void *arg ) {
return 0;
}
static int filter_get_sample_rate ( MSFilter *f, void *arg ) { static int filter_get_sample_rate ( MSFilter *f, void *arg ) {
*(int*)arg = ISAC_SAMPLE_RATE;
return 0; return 0;
} }
static int filter_set_bitrate ( MSFilter *f, void *arg );
#ifdef MS_AUDIO_ENCODER_SET_PTIME #ifdef MS_AUDIO_ENCODER_SET_PTIME
static int filter_get_ptime(MSFilter *f, void *arg){ static int filter_get_ptime(MSFilter *f, void *arg){
isac_encoder_struct_t* obj= ( isac_encoder_struct_t* ) f->data;
*(int*)arg=obj->ptime;
return 0; return 0;
} }
#endif
static int filter_set_ptime(MSFilter *f, void *arg){ static int filter_set_ptime(MSFilter *f, void *arg){
return 0; int asked = *(int*)arg;
} isac_encoder_struct_t* obj = (isac_encoder_struct_t*)f->data;
// iSAC handles only 30 or 60ms ptime
if( asked != 30 && asked != 60 ){
// use the closest
asked = (asked > 45)? 60 : 30;
}
obj->ptime = asked;
static int filter_add_fmtp ( MSFilter *f, void *arg ) {
return 0; return 0;
} }
#endif
static int filter_set_bitrate ( MSFilter *f, void *arg ) { static int filter_set_bitrate ( MSFilter *f, void *arg ) {
return 0; isac_encoder_struct_t *obj = (isac_encoder_struct_t*)f->data;
int max_bitrate = MIN(32000, * (int*)arg );
return WebRtcIsacfix_SetMaxRate(obj->isac, max_bitrate);
} }
static int filter_get_bitrate ( MSFilter *f, void *arg ) { static int filter_get_bitrate ( MSFilter *f, void *arg ) {
isac_encoder_struct_t *obj = (isac_encoder_struct_t*)f->data;
*(int*)arg = (int)WebRtcIsacfix_GetUplinkBw(obj->isac);
return 0; return 0;
} }
#ifdef MS_AUDIO_ENCODER_SET_PACKET_LOSS //#ifdef MS_AUDIO_ENCODER_SET_PACKET_LOSS
static int filter_set_packetloss(MSFilter *f, void *arg){ //static int filter_set_packetloss(MSFilter *f, void *arg){
return 0; // return 0;
} //}
static int filter_enable_inband_fec(MSFilter *f, void *arg){ //static int filter_enable_inband_fec(MSFilter *f, void *arg){
return 0; // return 0;
} //}
#endif /*MS_AUDIO_ENCODER_SET_PACKET_LOSS*/ //#endif /*MS_AUDIO_ENCODER_SET_PACKET_LOSS*/
static MSFilterMethod filter_methods[]= { static MSFilterMethod filter_methods[]= {
{MS_FILTER_SET_SAMPLE_RATE, filter_set_sample_rate },
{MS_FILTER_GET_SAMPLE_RATE, filter_get_sample_rate }, {MS_FILTER_GET_SAMPLE_RATE, filter_get_sample_rate },
{MS_FILTER_SET_BITRATE, filter_set_bitrate }, {MS_FILTER_SET_BITRATE, filter_set_bitrate },
{MS_FILTER_GET_BITRATE, filter_get_bitrate }, {MS_FILTER_GET_BITRATE, filter_get_bitrate },
{MS_FILTER_ADD_FMTP, filter_add_fmtp },
#ifdef MS_AUDIO_ENCODER_SET_PTIME #ifdef MS_AUDIO_ENCODER_SET_PTIME
{MS_AUDIO_ENCODER_SET_PTIME, filter_set_ptime }, {MS_AUDIO_ENCODER_SET_PTIME, filter_set_ptime },
{MS_AUDIO_ENCODER_GET_PTIME, filter_get_ptime }, {MS_AUDIO_ENCODER_GET_PTIME, filter_get_ptime },
#endif #endif
#ifdef MS_AUDIO_ENCODER_SET_PACKET_LOSS //#ifdef MS_AUDIO_ENCODER_SET_PACKET_LOSS
{MS_AUDIO_ENCODER_SET_PACKET_LOSS, filter_set_packetloss }, // {MS_AUDIO_ENCODER_SET_PACKET_LOSS, filter_set_packetloss },
{MS_AUDIO_ENCODER_ENABLE_FEC, filter_enable_inband_fec }, // {MS_AUDIO_ENCODER_ENABLE_FEC, filter_enable_inband_fec },
#endif //#endif
{0, NULL} {0, NULL}
}; };
...@@ -162,6 +267,7 @@ extern MSFilterDesc ms_isac_dec_desc; ...@@ -162,6 +267,7 @@ extern MSFilterDesc ms_isac_dec_desc;
#endif #endif
MS_PLUGIN_DECLARE ( void ) libmsisac_init() { MS_PLUGIN_DECLARE ( void ) libmsisac_init() {
WebRtcSpl_Init();
ms_filter_register ( &ms_isac_enc_desc ); ms_filter_register ( &ms_isac_enc_desc );
ms_filter_register ( &ms_isac_dec_desc ); ms_filter_register ( &ms_isac_dec_desc );
ms_message ( " libmsisac " VERSION " plugin loaded" ); ms_message ( " libmsisac " VERSION " plugin loaded" );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment