diff --git a/include/mediastreamer2/msfilerec.h b/include/mediastreamer2/msfilerec.h index 70e0a64e6..7fe417cc1 100644 --- a/include/mediastreamer2/msfilerec.h +++ b/include/mediastreamer2/msfilerec.h @@ -27,6 +27,7 @@ extern MSFilterDesc ms_file_rec_desc; #define MS_FILE_REC_START MS_FILTER_METHOD_NO_ARG(MS_FILE_REC_ID,1) #define MS_FILE_REC_STOP MS_FILTER_METHOD_NO_ARG(MS_FILE_REC_ID,2) #define MS_FILE_REC_CLOSE MS_FILTER_METHOD_NO_ARG(MS_FILE_REC_ID,3) +#define MS_FILE_REC_FORCE_WAV MS_FILTER_METHOD_NO_ARG(MS_FILE_REC_ID,4) diff --git a/src/audiofilters/msfilerec.c b/src/audiofilters/msfilerec.c index 7a008e8bc..a84cacb57 100644 --- a/src/audiofilters/msfilerec.c +++ b/src/audiofilters/msfilerec.c @@ -290,6 +290,12 @@ static int rec_set_max_size(MSFilter *f, void *arg) { return 0; } +static int rec_force_wav(MSFilter *f, void *arg) { + RecState *d=(RecState*)f->data; + d->is_wav = TRUE; + return 0; +} + static MSFilterMethod rec_methods[]={ { MS_FILTER_SET_SAMPLE_RATE, rec_set_sr }, { MS_FILTER_SET_NCHANNELS , rec_set_nchannels }, @@ -307,6 +313,7 @@ static MSFilterMethod rec_methods[]={ { MS_FILTER_GET_OUTPUT_FMT, rec_get_fmtp }, { MS_FILTER_SET_OUTPUT_FMT, rec_set_fmtp }, { MS_RECORDER_SET_MAX_SIZE, rec_set_max_size }, + { MS_FILE_REC_FORCE_WAV , rec_force_wav }, { 0 , NULL } };