From: Craig S. <cso...@us...> - 2004-08-24 14:15:22
|
Update of /cvsroot/openh323/openh323/plugins/audio/GSM0610 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17297/audio/GSM0610 Modified Files: Makefile.in gsm06_10_codec.c Log Message: Fixed potential problems with MS-GSM Index: Makefile.in =================================================================== RCS file: /cvsroot/openh323/openh323/plugins/audio/GSM0610/Makefile.in,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** Makefile.in 22 Aug 2004 04:20:18 -0000 1.8 --- Makefile.in 24 Aug 2004 14:15:12 -0000 1.9 *************** *** 21,24 **** --- 21,27 ---- # # $Log$ + # Revision 1.9 2004/08/24 14:15:12 csoutheren + # Fixed potential problems with MS-GSM + # # Revision 1.8 2004/08/22 04:20:18 csoutheren # Added -fPIC to build commands to fix problems on 64 bit platforms *************** *** 58,62 **** exec_prefix = ${PREFIX} LIBDIR=@LIBDIR@ ! H323_SYSTEM_GSM=@H323_SYSTEM_GSM@ H323_EMBEDDED_GSM=@H323_EMBEDDED_GSM@ --- 61,65 ---- exec_prefix = ${PREFIX} LIBDIR=@LIBDIR@ ! #H323_SYSTEM_GSM=@H323_SYSTEM_GSM@ H323_EMBEDDED_GSM=@H323_EMBEDDED_GSM@ *************** *** 77,81 **** SRCS += gsm06_10_codec.c ! ifeq ($(H323_SYSTEM_GSM),0) SRCS += $(SRCDIR)/gsm_create.c \ --- 80,84 ---- SRCS += gsm06_10_codec.c ! #ifeq ($(H323_SYSTEM_GSM),0) SRCS += $(SRCDIR)/gsm_create.c \ *************** *** 96,104 **** EXTRALIBS = ! else ! ! EXTRALIBS = -lgsm ! ! endif vpath %.o $(OBJDIR) --- 99,107 ---- EXTRALIBS = ! #else ! # ! #EXTRALIBS = -lgsm ! # ! #endif vpath %.o $(OBJDIR) Index: gsm06_10_codec.c =================================================================== RCS file: /cvsroot/openh323/openh323/plugins/audio/GSM0610/gsm06_10_codec.c,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** gsm06_10_codec.c 17 Jun 2004 22:04:40 -0000 1.11 --- gsm06_10_codec.c 24 Aug 2004 14:15:12 -0000 1.12 *************** *** 21,24 **** --- 21,27 ---- * * $Log$ + * Revision 1.12 2004/08/24 14:15:12 csoutheren + * Fixed potential problems with MS-GSM + * * Revision 1.11 2004/06/17 22:04:40 csoutheren * Changed codec version number to be sensible rather than string $Ver$ *************** *** 111,114 **** --- 114,120 ---- struct gsm_state * context = (struct gsm_state *)_context; gsm_encode(context, (void *)from, to); + + *toLen = BYTES_PER_FRAME; + return 1; } *************** *** 127,130 **** --- 133,139 ---- gsm_decode(context, (void *)from, to); + + *toLen = SAMPLES_PER_FRAME * 2; + return 1; } *************** *** 142,146 **** struct gsm_state * context = (struct gsm_state *)_context; ! if (*fromLen < (MSGSM_SAMPLES_PER_FRAME*2) || *toLen < MSGSM_BYTES_PER_FRAME) return 0; --- 151,155 ---- struct gsm_state * context = (struct gsm_state *)_context; ! if (*fromLen < (MSGSM_SAMPLES_PER_FRAME*2) || *toLen < MSGSM_BYTES_PER_FRAME) return 0; *************** *** 148,151 **** --- 157,162 ---- gsm_encode(context, ((short *)from)+160, ((unsigned char *)to)+32); + *toLen = MSGSM_BYTES_PER_FRAME; + return 1; } *************** *** 160,164 **** { struct gsm_state * context = (struct gsm_state *)_context; ! if (*fromLen < MSGSM_BYTES_PER_FRAME || *toLen < (MSGSM_SAMPLES_PER_FRAME*2)) return 0; --- 171,175 ---- { struct gsm_state * context = (struct gsm_state *)_context; ! if (*fromLen < MSGSM_BYTES_PER_FRAME || *toLen < (MSGSM_SAMPLES_PER_FRAME*2)) return 0; *************** *** 166,169 **** --- 177,182 ---- gsm_decode(context, ((unsigned char *)from)+33, ((short *)to)+160); + *toLen = MSGSM_SAMPLES_PER_FRAME * 2; + return 1; } *************** *** 175,179 **** "Craig Southeren, Post Increment", // source code author ! "1.0", // source code version "cr...@po...", // source code email "http://www.postincrement.com", // source code URL --- 188,192 ---- "Craig Southeren, Post Increment", // source code author ! "1.1", // source code version "cr...@po...", // source code email "http://www.postincrement.com", // source code URL *************** *** 245,249 **** { int val; ! if (data == NULL || data->objectId != NULL || data->data == NULL) return -1; --- 258,263 ---- { int val; ! ! if ((data == NULL) || (data->objectId != NULL) || (data->data == NULL)) return -1; *************** *** 324,328 **** PluginCodec_InputTypeRaw | // raw input data PluginCodec_OutputTypeRaw | // raw output data ! PluginCodec_RTPTypeDynamic, // dynamic RTP type gsm0610, // text decription --- 338,342 ---- PluginCodec_InputTypeRaw | // raw input data PluginCodec_OutputTypeRaw | // raw output data ! PluginCodec_RTPTypeExplicit, // dynamic RTP type gsm0610, // text decription |