changed SessionScheduler name to MediaProcessor

ivr python version changed to 2.4 by default Makefile


git-svn-id: http://svn.berlios.de/svnroot/repos/sems/trunk@95 8eb893ce-cfd4-0310-b710-fb5ebe64c474
sayer/1.4-spce2.6
Stefan Sayer 20 years ago
parent 183eeca64a
commit bbfe61da5f

@ -26,7 +26,6 @@
*/
#include "AnnounceB2B.h"
#include "AmSessionScheduler.h"
#include "AmSessionContainer.h"
#include "AmConfig.h"
#include "AmUtils.h"

@ -28,7 +28,6 @@
#include "Announcement.h"
#include "AmConfig.h"
#include "AmUtils.h"
#include "AmSessionScheduler.h"
#include "sems.h"
#include "log.h"

@ -32,7 +32,7 @@
#include "AmConfig.h"
#include "AmSessionContainer.h"
#include "AmSessionScheduler.h"
#include "AmMediaProcessor.h"
#include "sems.h"
#include "log.h"
@ -443,7 +443,7 @@ void ConferenceDialog::onSipReply(const AmSipReply& reply)
onSessionStart(reply);
if(getInput() || getOutput())
AmSessionScheduler::instance()->addSession(this,
AmMediaProcessor::instance()->addSession(this,
getCallgroup());
else {
ERROR("missing audio input and/or ouput.\n");

@ -28,7 +28,6 @@
#include "EarlyAnnounce.h"
#include "AmConfig.h"
#include "AmUtils.h"
#include "AmSessionScheduler.h"
#include "sems.h"
#include "log.h"

@ -30,8 +30,6 @@
#include "log.h"
#include "AmApi.h"
#include "AmUtils.h"
#include "AmSessionScheduler.h"
//#include "AmSessionTimer.h"
#include "AmPlugIn.h"
#include <unistd.h>

@ -11,14 +11,14 @@ TTS = y
#
# PYTHON_VERSION might also be 2.2 -- except for the use of GIL
# do a ls /usr/include/python2.3/Python.h to see if it's there
PY_VER = 2.3
PY_VER = 2.4
# adjust to point to python include path
# can also be /usr/include/python$(PY_VER)
# look for Python.h in the specified path
# Python prefix is what you configured python with
# if you built from source (e.g. ./configure --with-prefix=/usr/local)
# on debian it's often /usr, on SuSE and FreeBSD /usr/local
PYTHON_PREFIX = /usr
PYTHON_PREFIX = /usr/local
PYTHON_DIR = $(PYTHON_PREFIX)/include/python$(PY_VER)
PYTHON_LIBDIR = $(PYTHON_PREFIX)/lib/python$(PY_VER)

@ -33,7 +33,6 @@
#include "AmUtils.h"
#include "AmPlugIn.h"
#include "AmPlaylist.h"
#include "AmSessionScheduler.h"
#include "sems.h"
#include "log.h"

@ -50,7 +50,7 @@ string AmConfig::LocalIP = "";
string AmConfig::PrefixSep = PREFIX_SEPARATOR;
int AmConfig::RtpLowPort = RTP_LOWPORT;
int AmConfig::RtpHighPort = RTP_HIGHPORT;
int AmConfig::SessionSchedulerThreads = NUM_SESSION_SCHEDULERS;
int AmConfig::MediaProcessorThreads = NUM_MEDIA_PROCESSORS;
AmSessionTimerConfig AmConfig::defaultSessionTimerConfig;
@ -109,8 +109,8 @@ int AmConfig::setStderr(const string& s) {
return 1;
}
int AmConfig::setSessionSchedulerThreads(const string& th) {
if(sscanf(th.c_str(),"%u",&SessionSchedulerThreads) != 1) {
int AmConfig::setMediaProcessorThreads(const string& th) {
if(sscanf(th.c_str(),"%u",&MediaProcessorThreads) != 1) {
return 0;
}
return 1;
@ -204,9 +204,9 @@ DBG("RvR :- Local IP set to %s\n", LocalIP.c_str());
}
}
if(cfg.hasParameter("session_scheduler_threads")){
if(!setSessionSchedulerThreads(cfg.getParameter("session_scheduler_threads"))){
ERROR("invalid session_scheduler_threads value specified");
if(cfg.hasParameter("media_processor_threads")){
if(!setMediaProcessorThreads(cfg.getParameter("media_processor_threads"))){
ERROR("invalid media_processor_threads value specified");
return -1;
}
}

@ -76,7 +76,7 @@ struct AmConfig
/* Session Timer: -ssa */
static AmSessionTimerConfig defaultSessionTimerConfig;
/** number of session scheduler threads */
static int SessionSchedulerThreads;
static int MediaProcessorThreads;
/** Init function. Resolves SMTP server address. */
static int init();
@ -98,8 +98,8 @@ struct AmConfig
static int setFork(const string& fork);
/** Setter for parameter stderr, returns 0 on invalid value */
static int setStderr(const string& s);
/** Setter for parameter SessionSchedulerThreads, returns 0 on invalid value */
static int setSessionSchedulerThreads(const string& th);
/** Setter for parameter MediaProcessorThreads, returns 0 on invalid value */
static int setMediaProcessorThreads(const string& th);
};
class AmConfigReader;

@ -294,7 +294,8 @@ private:
AmMutex m_reportLock;
/**
* Implementation of AmEventHandler::process(). Processes events from AmSessionScheduler.
* Implementation of AmEventHandler::process().
* Processes events from AmMediaProcessor.
* @see AmEventHandler
*/
virtual void process(AmEvent *);

@ -25,7 +25,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "AmSessionScheduler.h"
#include "AmMediaProcessor.h"
#include <assert.h>
#include <sys/time.h>

@ -35,7 +35,7 @@
#include "AmPlugIn.h"
#include "AmApi.h"
#include "AmSessionContainer.h"
#include "AmSessionScheduler.h"
#include "AmMediaProcessor.h"
#include "AmDtmfDetector.h"
#include "log.h"
@ -324,7 +324,7 @@ void AmSession::run()
destroy();
// wait at least until session is out of RtpScheduler
DBG("session is stopped, waiting for detach from SessionScheduler.\n");
DBG("session is stopped, waiting for detach from MediaProcessor.\n");
//detached.wait_for();
}
@ -332,7 +332,7 @@ void AmSession::on_stop()
{
//sess_stopped.set(true);
DBG("AmSession::on_stop()\n");
AmSessionScheduler::instance()->removeSession(this);
AmMediaProcessor::instance()->removeSession(this);
}
void AmSession::destroy()
@ -479,7 +479,7 @@ void AmSession::onSipRequest(const AmSipRequest& req)
onSessionStart(req);
if(input || output)
AmSessionScheduler::instance()->addSession(this, callgroup);
AmMediaProcessor::instance()->addSession(this, callgroup);
else {
ERROR("missing audio input and/or ouput.\n");
}
@ -533,8 +533,8 @@ void AmSession::onSipReply(const AmSipReply& reply)
onSessionStart(reply);
if(input || output)
AmSessionScheduler::instance()->addSession(this,
callgroup);
AmMediaProcessor::instance()->addSession(this,
callgroup);
else {
ERROR("missing audio input and/or ouput.\n");
}

@ -123,8 +123,8 @@ class AmSession : public AmThread,
AmCondition<bool> sess_stopped;
AmCondition<bool> detached;
friend class AmSessionScheduler;
friend class AmSessionSchedulerThread;
friend class AmMediaProcessor;
friend class AmMediaProcessorThread;
friend class AmSessionContainer;
friend class AmSessionFactory;

@ -70,3 +70,11 @@ rtp_low_port=10000
#
# - sets port of rtp highest server
rtp_high_port=60000
# optional parameter: media_processor_threads=<num_value>
#
# - controls how many threads should be created that
# process media - on single-processor systems set this
# parameter to 1 (default), on MP systems to a higher
# value
media_processor_threads=1

@ -35,7 +35,7 @@
#include "AmServer.h"
#include "AmCtrlInterface.h"
#include "AmInterfaceHandler.h"
#include "AmSessionScheduler.h"
#include "AmMediaProcessor.h"
#include "AmIcmpWatcher.h"
#include "AmRtpReceiver.h"
//#include "AmSessionTimer.h"
@ -402,9 +402,8 @@ int main(int argc, char* argv[])
DBG("Starting session container\n");
AmSessionContainer::instance()->start();
DBG("Starting session scheduler\n");
AmSessionScheduler::instance()->init();
// AmSessionScheduler::instance()->start(true);
DBG("Starting media processor\n");
AmMediaProcessor::instance()->init();
DBG("Starting mailer\n");
AmMailDeamon::instance()->start();

@ -50,7 +50,7 @@
#define SESSION_EXPIRES 10 // seconds
#define MINIMUM_TIMER 5 //seconds
#define NUM_SESSION_SCHEDULERS 1
#define NUM_MEDIA_PROCESSORS 1
#define MAX_NET_DEVICES 32

Loading…
Cancel
Save