Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
jami-daemon
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
savoirfairelinux
jami-daemon
Commits
5c9e5edf
Commit
5c9e5edf
authored
14 years ago
by
Alexandre Savard
Browse files
Options
Downloads
Patches
Plain Diff
[#5211] Initialize sip call memory pool using 16 kb
parent
27cbe91f
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
sflphone-common/src/sip/sipcall.cpp
+6
-2
6 additions, 2 deletions
sflphone-common/src/sip/sipcall.cpp
sflphone-common/src/sip/sipcall.h
+54
-14
54 additions, 14 deletions
sflphone-common/src/sip/sipcall.h
with
60 additions
and
16 deletions
sflphone-common/src/sip/sipcall.cpp
+
6
−
2
View file @
5c9e5edf
...
...
@@ -35,6 +35,9 @@
#include
"global.h"
// for _debug
#include
"sdp.h"
const
int
SIPCall
::
CALL_MEMPOOL_INIT_SIZE
=
16000
;
const
int
SIPCall
::
CALL_MEMPOOL_INC_SIZE
=
4000
;
SIPCall
::
SIPCall
(
const
CallID
&
id
,
Call
::
CallType
type
,
pj_caching_pool
*
caching_pool
)
:
Call
(
id
,
type
)
,
_cid
(
0
)
,
_did
(
0
)
...
...
@@ -46,8 +49,9 @@ SIPCall::SIPCall (const CallID& id, Call::CallType type, pj_caching_pool *cachin
{
_debug
(
"SIPCall: Create new call %s"
,
id
.
c_str
());
// Create memory pool for application.
_pool
=
pj_pool_create
(
&
caching_pool
->
factory
,
id
.
c_str
(),
4000
,
4000
,
NULL
);
// Create memory pool for application, initialization value is based on empiric values.
_pool
=
pj_pool_create
(
&
caching_pool
->
factory
,
id
.
c_str
(),
CALL_MEMPOOL_INIT_SIZE
,
CALL_MEMPOOL_INC_SIZE
,
NULL
);
_local_sdp
=
new
Sdp
(
_pool
);
}
...
...
This diff is collapsed.
Click to expand it.
sflphone-common/src/sip/sipcall.h
+
54
−
14
View file @
5c9e5edf
...
...
@@ -67,13 +67,13 @@ class SIPCall : public Call
/**
* Destructor
*/
~
SIPCall
();
~
SIPCall
();
/**
* Call Identifier
* @return int SIP call id
*/
int
getCid
()
{
int
getCid
()
{
return
_cid
;
}
...
...
@@ -82,7 +82,7 @@ class SIPCall : public Call
* @param cid SIP call id
*/
void
setCid
(
int
cid
)
{
_cid
=
cid
;
_cid
=
cid
;
}
/**
...
...
@@ -105,13 +105,10 @@ class SIPCall : public Call
* Transaction identifier
* @return int SIP transaction id
*/
int
getTid
()
{
int
getTid
()
{
return
_tid
;
}
/**
* Transaction identifier
* @param tid SIP transaction id
...
...
@@ -120,10 +117,16 @@ class SIPCall : public Call
_tid
=
tid
;
}
/**
* Set event subscription internal structure
*/
void
setXferSub
(
pjsip_evsub
*
sub
)
{
_xferSub
=
sub
;
}
/**
* Get event subscription internal structure
*/
pjsip_evsub
*
getXferSub
()
{
return
_xferSub
;
}
...
...
@@ -136,36 +139,73 @@ class SIPCall : public Call
return
_invSession
;
}
/**
* Return the local SDP session
*/
Sdp
*
getLocalSDP
(
void
)
{
return
_local_sdp
;
}
/**
* Set the local SDP session
*/
void
setLocalSDP
(
Sdp
*
local_sdp
)
{
_local_sdp
=
local_sdp
;
}
/** Returns a pointer to the AudioRtp object */
/**
* Returns a pointer to the AudioRtp object
*/
inline
sfl
::
AudioRtpFactory
*
getAudioRtp
(
void
)
{
return
_audiortp
;
}
private
:
int
_cid
;
int
_did
;
int
_tid
;
// Copy Constructor
SIPCall
(
const
SIPCall
&
rh
);
// Assignment Operator
SIPCall
&
operator
=
(
const
SIPCall
&
rh
);
/** Starting sound */
/**
* Call specific memory pool initialization size (based on empirical data)
*/
static
const
int
CALL_MEMPOOL_INIT_SIZE
;
/**
* Call specific memory pool incrementation size
*/
static
const
int
CALL_MEMPOOL_INC_SIZE
;
/**
* Call identifier
*/
int
_cid
;
/**
* Domain identifier
*/
int
_did
;
/**
* Transaction identifier
*/
int
_tid
;
/**
* Audio Rtp Session factory
*/
sfl
::
AudioRtpFactory
*
_audiortp
;
/**
* Event subscription structure
*/
pjsip_evsub
*
_xferSub
;
/**
* The invite session to be reused in case of transfer
*/
pjsip_inv_session
*
_invSession
;
/**
...
...
@@ -174,7 +214,7 @@ class SIPCall : public Call
Sdp
*
_local_sdp
;
/**
* The pool to allocate memory
* The pool to allocate memory
, released once call hang up
*/
pj_pool_t
*
_pool
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment