[Freeswitch-svn] [commit] r4212 - in freeswitch/trunk/src: . include mod/formats/mod_native_file
Freeswitch SVN
anthm at freeswitch.org
Mon Feb 12 17:56:08 EST 2007
Author: anthm
Date: Mon Feb 12 17:56:08 2007
New Revision: 4212
Modified:
freeswitch/trunk/src/include/switch_types.h
freeswitch/trunk/src/mod/formats/mod_native_file/mod_native_file.c
freeswitch/trunk/src/switch_ivr.c
Log:
fix mod_native_file extension thingy
Modified: freeswitch/trunk/src/include/switch_types.h
==============================================================================
--- freeswitch/trunk/src/include/switch_types.h (original)
+++ freeswitch/trunk/src/include/switch_types.h Mon Feb 12 17:56:08 2007
@@ -682,6 +682,7 @@
SWITCH_FILE_DATA_DOUBLE = (1 << 6) - Read data in doubles
SWITCH_FILE_DATA_RAW = (1 << 7) - Read data as is
SWITCH_FILE_PAUSE = (1 << 8) - Pause
+SWITCH_FILE_NATIVE = (1 << 8) - File is in native format (no transcoding)
</pre>
*/
typedef enum {
@@ -693,7 +694,8 @@
SWITCH_FILE_DATA_FLOAT = (1 << 5),
SWITCH_FILE_DATA_DOUBLE = (1 << 6),
SWITCH_FILE_DATA_RAW = (1 << 7),
- SWITCH_FILE_PAUSE = (1 << 8)
+ SWITCH_FILE_PAUSE = (1 << 8),
+ SWITCH_FILE_NATIVE = (1 << 9)
} switch_file_flag_t;
typedef enum {
Modified: freeswitch/trunk/src/mod/formats/mod_native_file/mod_native_file.c
==============================================================================
--- freeswitch/trunk/src/mod/formats/mod_native_file/mod_native_file.c (original)
+++ freeswitch/trunk/src/mod/formats/mod_native_file/mod_native_file.c Mon Feb 12 17:56:08 2007
@@ -78,6 +78,7 @@
handle->seekable = 1;
handle->speed = 0;
handle->private_info = context;
+ handle->flags |= SWITCH_FILE_NATIVE;
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "Opening File [%s] %dhz\n", path, handle->samplerate);
Modified: freeswitch/trunk/src/switch_ivr.c
==============================================================================
--- freeswitch/trunk/src/switch_ivr.c (original)
+++ freeswitch/trunk/src/switch_ivr.c Mon Feb 12 17:56:08 2007
@@ -1142,6 +1142,9 @@
switch_core_session_reset(session);
return SWITCH_STATUS_NOTFOUND;
}
+ if (switch_test_flag(fh, SWITCH_FILE_NATIVE)) {
+ asis = 1;
+ }
write_frame.data = abuf;
More information about the Freeswitch-svn
mailing list