mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-07-06 04:11:52 +00:00
add adjustable buffering to mod_shout (see example in config file)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@5303 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
@@ -9,6 +9,7 @@ int PySession::streamfile(char *file, PyObject *pyfunc, char *funcargs, int star
|
||||
switch_input_args_t args = { 0 }, *ap = NULL;
|
||||
struct input_callback_state cb_state = { 0 };
|
||||
switch_file_handle_t fh = { 0 };
|
||||
char *prebuf;
|
||||
|
||||
sanity_check(-1);
|
||||
cb_state.funcargs = funcargs;
|
||||
@@ -31,6 +32,13 @@ int PySession::streamfile(char *file, PyObject *pyfunc, char *funcargs, int star
|
||||
ap = &args;
|
||||
}
|
||||
|
||||
if ((prebuf = switch_channel_get_variable(this->channel, "stream_prebuffer"))) {
|
||||
int maybe = atoi(prebuf);
|
||||
if (maybe > 0) {
|
||||
fh.prebuf = maybe;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
this->begin_allow_threads();
|
||||
cb_state.threadState = threadState; // pass threadState so the dtmfhandler can pick it up
|
||||
|
||||
Reference in New Issue
Block a user