PJSIP Performance

MH
mohamed hassan
Mon, Feb 16, 2009 9:10 PM

Hi all,
I am working in pjsip in symbian platform, pjsip work fun but battery down and end in two hours before full charginng.


Invite your mail contacts to join your friends list with Windows Live Spaces. It's easy!
http://spaces.live.com/spacesapi.aspx?wx_action=create&wx_url=/friends.aspx&mkt=en-us

Hi all, I am working in pjsip in symbian platform, pjsip work fun but battery down and end in two hours before full charginng. _________________________________________________________________ Invite your mail contacts to join your friends list with Windows Live Spaces. It's easy! http://spaces.live.com/spacesapi.aspx?wx_action=create&wx_url=/friends.aspx&mkt=en-us
I
iajdani@provati.com
Mon, Feb 16, 2009 11:48 PM

Just a little feedback for new APS-DIRECT.
If I just
put this piece of code in early state the players and sound device fails.
I am not doing anything fancy here but just closing the sound device and
opening it... and using your code as reference.
Any
thought????

else if (ci.state==PJSIP_INV_STATE_EARLY){

#define SAMPLES_PER_FRAME 64
#define ON_DURATION 1500
#define OFF_DURATION 2500

pjmedia_port * conf;
conf = pjsua_set_no_snd_dev();

pjmedia_snd_setting setting;

conf->info.samples_per_frame =SAMPLES_PER_FRAME;
conf->info.clock_rate =
8000;
conf->info.channel_count =
1;
conf->info.bits_per_sample =
16;
conf->info.format.u32 = PJMEDIA_FORMAT_L16;

pj_bzero(&setting, sizeof(setting));
setting.format.u32 = PJMEDIA_FORMAT_L16;
setting.bitrate =
8000;
setting.cng = 0;
setting.vad = 0;
setting.plc = 0;
pj_status_t status;
status = pjmedia_snd_port_create2(app_pool, PJMEDIA_DIR_CAPTURE_PLAYBACK,
0,
0,
8000,
1,
SAMPLES_PER_FRAME,
16,
&setting,
&g_snd_port);
if (status !=
PJ_SUCCESS)
{
PJ_LOG(1,(THIS_FILE,
"on_stream_created() failed to reopen sound
"

"device,
status=%d", status));
}

status = pjmedia_snd_port_connect(g_snd_port, conf);
if (status !=
PJ_SUCCESS)
{
PJ_LOG(1,(THIS_FILE,
"on_stream_created() failed to connect sound
"

"device to conference,
status=%d", status));
}
pjmedia_snd_port_destroy(g_snd_port);
g_snd_port = NULL;

}

Just a little feedback for new APS-DIRECT. If I just put this piece of code in early state the players and sound device fails. I am not doing anything fancy here but just closing the sound device and opening it... and using your code as reference. Any thought???? else if (ci.state==PJSIP_INV_STATE_EARLY){ #define SAMPLES_PER_FRAME 64 #define ON_DURATION 1500 #define OFF_DURATION 2500 pjmedia_port * conf; conf = pjsua_set_no_snd_dev(); pjmedia_snd_setting setting; conf->info.samples_per_frame =SAMPLES_PER_FRAME; conf->info.clock_rate = 8000; conf->info.channel_count = 1; conf->info.bits_per_sample = 16; conf->info.format.u32 = PJMEDIA_FORMAT_L16; pj_bzero(&setting, sizeof(setting)); setting.format.u32 = PJMEDIA_FORMAT_L16; setting.bitrate = 8000; setting.cng = 0; setting.vad = 0; setting.plc = 0; pj_status_t status; status = pjmedia_snd_port_create2(app_pool, PJMEDIA_DIR_CAPTURE_PLAYBACK, 0, 0, 8000, 1, SAMPLES_PER_FRAME, 16, &setting, &g_snd_port); if (status != PJ_SUCCESS) { PJ_LOG(1,(THIS_FILE, "on_stream_created() failed to reopen sound " "device, status=%d", status)); } status = pjmedia_snd_port_connect(g_snd_port, conf); if (status != PJ_SUCCESS) { PJ_LOG(1,(THIS_FILE, "on_stream_created() failed to connect sound " "device to conference, status=%d", status)); } pjmedia_snd_port_destroy(g_snd_port); g_snd_port = NULL; }