mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-07-23 20:51:58 +00:00
more ivr stuff (not done)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@693 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
@@ -104,6 +104,11 @@ SWITCH_DECLARE(int) switch_buffer_write(switch_buffer *buffer, void *data, size_
|
||||
* \return int size of buffer, or 0 if unable to toss that much data
|
||||
*/
|
||||
SWITCH_DECLARE(int) switch_buffer_toss(switch_buffer *buffer, size_t datalen);
|
||||
|
||||
/*! \brief Remove all data from the buffer
|
||||
* \param buffer any buffer of type switch_buffer
|
||||
*/
|
||||
SWITCH_DECLARE(void) switch_buffer_zero(switch_buffer *buffer);
|
||||
/** @} */
|
||||
|
||||
|
||||
|
||||
@@ -743,7 +743,7 @@ SWITCH_DECLARE(switch_status) switch_core_file_write(switch_file_handle *fh, voi
|
||||
\param whence the indicator (see traditional seek)
|
||||
\return SWITCH_STATUS_SUCCESS with cur_pos adjusted to new position
|
||||
*/
|
||||
SWITCH_DECLARE(switch_status) switch_core_file_seek(switch_file_handle *fh, unsigned int *cur_pos, unsigned int samples, int whence);
|
||||
SWITCH_DECLARE(switch_status) switch_core_file_seek(switch_file_handle *fh, unsigned int *cur_pos, int64_t samples, int whence);
|
||||
|
||||
/*!
|
||||
\brief Close an open file handle
|
||||
|
||||
@@ -85,6 +85,7 @@ SWITCH_DECLARE(switch_status) switch_ivr_collect_digits_count(switch_core_sessio
|
||||
/*!
|
||||
\brief play a file from the disk to the session
|
||||
\param session the session to play the file too
|
||||
\param pointer to file handle to use (NULL for builtin one)
|
||||
\param file the path to the file
|
||||
\param timer_name the name of a timer to use input will be absorbed (NULL to time off the session input).
|
||||
\param dtmf_callback code to execute if any dtmf is dialed during the playback
|
||||
@@ -94,6 +95,7 @@ SWITCH_DECLARE(switch_status) switch_ivr_collect_digits_count(switch_core_sessio
|
||||
\note passing a NULL dtmf_callback nad a not NULL buf indicates to copy any dtmf to buf and stop playback.
|
||||
*/
|
||||
SWITCH_DECLARE(switch_status) switch_ivr_play_file(switch_core_session *session,
|
||||
switch_file_handle *fh,
|
||||
char *file,
|
||||
char *timer_name,
|
||||
switch_dtmf_callback_function dtmf_callback,
|
||||
|
||||
@@ -245,7 +245,7 @@ struct switch_file_interface {
|
||||
/*! function to write from the file */
|
||||
switch_status (*file_write)(switch_file_handle *, void *data, size_t *len);
|
||||
/*! function to seek to a certian position in the file */
|
||||
switch_status (*file_seek)(switch_file_handle *, unsigned int *cur_pos, unsigned int samples, int whence);
|
||||
switch_status (*file_seek)(switch_file_handle *, unsigned int *cur_pos, int64_t samples, int whence);
|
||||
/*! list of supported file extensions */
|
||||
char **extens;
|
||||
const struct switch_file_interface *next;
|
||||
@@ -273,10 +273,14 @@ struct switch_file_handle {
|
||||
int seekable;
|
||||
/*! the sample count of the file */
|
||||
unsigned int sample_count;
|
||||
/*! the speed of the file playback*/
|
||||
int speed;
|
||||
/*! the handle's memory pool */
|
||||
switch_memory_pool *memory_pool;
|
||||
/*! private data for the format module to store handle specific info */
|
||||
void *private_info;
|
||||
int64_t pos;
|
||||
switch_buffer *audio_buffer;
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -319,6 +319,7 @@ SWITCH_FILE_DATA_INT = (1 << 4) - Read data in ints
|
||||
SWITCH_FILE_DATA_FLOAT = (1 << 5) - Read data in floats
|
||||
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
|
||||
</pre>
|
||||
*/
|
||||
typedef enum {
|
||||
@@ -330,6 +331,7 @@ typedef enum {
|
||||
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_flag;
|
||||
|
||||
typedef enum {
|
||||
|
||||
Reference in New Issue
Block a user