Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
liblinphone
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
10
Issues
10
List
Board
Labels
Milestones
Merge Requests
21
Merge Requests
21
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
External Wiki
External Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
BC
public
liblinphone
Commits
7c6d7bc2
Commit
7c6d7bc2
authored
Dec 07, 2017
by
Ghislain MARY
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix media start count check in testers.
parent
a76f869d
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
22 additions
and
8 deletions
+22
-8
tester_utils.cpp
coreapi/tester_utils.cpp
+5
-0
tester_utils.h
coreapi/tester_utils.h
+1
-0
call-p.h
src/call/call-p.h
+1
-0
call.cpp
src/call/call.cpp
+4
-0
media-session-p.h
src/conference/session/media-session-p.h
+2
-1
media-session.cpp
src/conference/session/media-session.cpp
+5
-1
call_single_tester.c
tester/call_single_tester.c
+4
-6
No files found.
coreapi/tester_utils.cpp
View file @
7c6d7bc2
...
...
@@ -20,6 +20,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#include "tester_utils.h"
#include "private.h"
#include "call/call-p.h"
#include "chat/chat-room/chat-room.h"
#include "core/core.h"
#include "c-wrapper/c-wrapper.h"
...
...
@@ -103,3 +104,7 @@ const bctbx_list_t *linphone_friend_list_get_dirty_friends_to_update(const Linph
int
linphone_friend_list_get_revision
(
const
LinphoneFriendList
*
lfl
)
{
return
lfl
->
revision
;
}
unsigned
int
_linphone_call_get_nb_media_starts
(
const
LinphoneCall
*
call
)
{
return
L_GET_PRIVATE_FROM_C_OBJECT
(
call
)
->
getMediaStartCount
();
}
coreapi/tester_utils.h
View file @
7c6d7bc2
...
...
@@ -82,6 +82,7 @@ LINPHONE_PUBLIC LinphoneCallLog *linphone_call_get_log(const LinphoneCall *call)
LINPHONE_PUBLIC
MediaStream
*
linphone_call_get_stream
(
LinphoneCall
*
call
,
LinphoneStreamType
type
);
LINPHONE_PUBLIC
bool_t
linphone_call_get_all_muted
(
const
LinphoneCall
*
call
);
LINPHONE_PUBLIC
LinphoneProxyConfig
*
linphone_call_get_dest_proxy
(
const
LinphoneCall
*
call
);
LINPHONE_PUBLIC
unsigned
int
_linphone_call_get_nb_media_starts
(
const
LinphoneCall
*
call
);
LINPHONE_PUBLIC
void
linphone_call_params_set_no_user_consent
(
LinphoneCallParams
*
params
,
bool_t
value
);
LINPHONE_PUBLIC
bool_t
linphone_call_params_get_update_call_when_ice_completed
(
const
LinphoneCallParams
*
params
);
...
...
src/call/call-p.h
View file @
7c6d7bc2
...
...
@@ -49,6 +49,7 @@ public:
LinphoneProxyConfig
*
getDestProxy
()
const
;
IceSession
*
getIceSession
()
const
;
unsigned
int
getMediaStartCount
()
const
;
MediaStream
*
getMediaStream
(
LinphoneStreamType
type
)
const
;
SalCallOp
*
getOp
()
const
;
void
setAudioMuted
(
bool
value
);
...
...
src/call/call.cpp
View file @
7c6d7bc2
...
...
@@ -42,6 +42,10 @@ IceSession *CallPrivate::getIceSession () const {
return
static_pointer_cast
<
MediaSession
>
(
getActiveSession
())
->
getPrivate
()
->
getIceSession
();
}
unsigned
int
CallPrivate
::
getMediaStartCount
()
const
{
return
static_pointer_cast
<
MediaSession
>
(
getActiveSession
())
->
getPrivate
()
->
getMediaStartCount
();
}
MediaStream
*
CallPrivate
::
getMediaStream
(
LinphoneStreamType
type
)
const
{
return
static_pointer_cast
<
MediaSession
>
(
getActiveSession
())
->
getPrivate
()
->
getMediaStream
(
type
);
}
...
...
src/conference/session/media-session-p.h
View file @
7c6d7bc2
...
...
@@ -78,6 +78,7 @@ public:
SalMediaDescription
*
getLocalDesc
()
const
{
return
localDesc
;
}
unsigned
int
getMediaStartCount
()
const
;
MediaStream
*
getMediaStream
(
LinphoneStreamType
type
)
const
;
LinphoneNatPolicy
*
getNatPolicy
()
const
{
return
natPolicy
;
}
...
...
@@ -308,7 +309,7 @@ private:
bool
authTokenVerified
=
false
;
std
::
string
dtlsCertificateFingerprint
;
unsigned
int
nbMediaStarts
=
0
;
unsigned
int
mediaStartCount
=
0
;
// Upload bandwidth setting at the time the call is started. Used to detect if it changes during a call.
int
upBandwidth
=
0
;
...
...
src/conference/session/media-session.cpp
View file @
7c6d7bc2
...
...
@@ -896,6 +896,10 @@ OrtpEvQueue * MediaSessionPrivate::getEventQueue (int streamIndex) const {
return
nullptr
;
}
unsigned
int
MediaSessionPrivate
::
getMediaStartCount
()
const
{
return
mediaStartCount
;
}
MediaStream
*
MediaSessionPrivate
::
getMediaStream
(
int
streamIndex
)
const
{
if
(
streamIndex
==
mainAudioStreamIndex
)
return
&
audioStream
->
ms
;
...
...
@@ -2775,7 +2779,7 @@ void MediaSessionPrivate::startStreams (LinphoneCallState targetState) {
setSymmetricRtp
(
false
);
}
nbMediaStarts
++
;
mediaStartCount
++
;
bool
videoWillBeUsed
=
false
;
#if defined(VIDEO_ENABLED)
const
SalStreamDescription
*
vstream
=
sal_media_description_find_best_stream
(
resultDesc
,
SalVideo
);
...
...
tester/call_single_tester.c
View file @
7c6d7bc2
...
...
@@ -1530,16 +1530,14 @@ int check_nb_media_starts(LinphoneCoreManager *caller, LinphoneCoreManager *call
BC_ASSERT_PTR_NOT_NULL
(
c2
);
if
(
!
c1
||
!
c2
)
return
FALSE
;
#if 0
if
(
c1
)
{
c1_ret =
c1->nb_media_starts == caller_nb_media_starts
;
BC_ASSERT_EQUAL(
c1->nb_media_starts
, caller_nb_media_starts, unsigned int, "%u");
c1_ret
=
(
_linphone_call_get_nb_media_starts
(
c1
)
==
caller_nb_media_starts
)
?
TRUE
:
FALSE
;
BC_ASSERT_EQUAL
(
_linphone_call_get_nb_media_starts
(
c1
)
,
caller_nb_media_starts
,
unsigned
int
,
"%u"
);
}
if
(
c2
)
{
c2_ret =
c2->nb_media_starts == callee_nb_media_starts
;
BC_ASSERT_EQUAL(
c2->nb_media_starts
, callee_nb_media_starts, unsigned int, "%u");
c2_ret
=
(
_linphone_call_get_nb_media_starts
(
c2
)
==
callee_nb_media_starts
)
?
TRUE
:
FALSE
;
BC_ASSERT_EQUAL
(
_linphone_call_get_nb_media_starts
(
c2
)
,
callee_nb_media_starts
,
unsigned
int
,
"%u"
);
}
#endif
return
c1_ret
&&
c2_ret
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment