Hi Sujay:
I took a pass at coding support for recording to files with GSM encoding. I checked in MprRecorder with the changes. I only tested it enough to verify that it still works for wave files using PCM. So the GSM part needs testing and most likely debugging. To enable GSM you will need the following patch.
Note that I did not make any changes to add support for reading wave files with GSM encoding, only for writing.
Cheers,
Dan
Index: sipXmediaMediaProcessing/src/CpTopologyGraphInterface.cpp
===================================================================
--- sipXmediaMediaProcessing/src/CpTopologyGraphInterface.cpp (revision 12183)
+++ sipXmediaMediaProcessing/src/CpTopologyGraphInterface.cpp (working copy)
@@ -63,6 +63,8 @@
// CONSTANTS
#define MINIMUM_DTMF_LENGTH 60
#define MAX_RTP_PORTS 1000
+//#define WAV_FILE_ENCODING MprRecorder::WAV_PCM_16
+#define WAV_FILE_ENCODING MprRecorder::WAV_GSM
//#define TEST_PRINT
@@ -1935,7 +1939,7 @@
stat = MprRecorder::startFile(DEFAULT_RECORDER_RESOURCE_NAME,
*mpTopologyGraph->getMsgQ(),
szFile,
- MprRecorder::WAV_PCM_16);
+ WAV_FILE_ENCODING);
}
return stat;