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
f35992be
Commit
f35992be
authored
4 years ago
by
Pierre Lespagnol
Browse files
Options
Downloads
Patches
Plain Diff
conference: allow to receive the new confInfo
Gitlab:
#468
Change-Id: I2c94823bb8efab6fccddd59de1ae96f290745691
parent
b3c4f995
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/call.cpp
+24
-6
24 additions, 6 deletions
src/call.cpp
src/conference.h
+2
-0
2 additions, 0 deletions
src/conference.h
with
26 additions
and
6 deletions
src/call.cpp
+
24
−
6
View file @
f35992be
...
...
@@ -643,12 +643,30 @@ Call::setConferenceInfo(const std::string& msg)
Json
::
CharReaderBuilder
rbuilder
;
auto
reader
=
std
::
unique_ptr
<
Json
::
CharReader
>
(
rbuilder
.
newCharReader
());
if
(
reader
->
parse
(
msg
.
data
(),
msg
.
data
()
+
msg
.
size
(),
&
json
,
&
err
))
{
for
(
const
auto
&
participantInfo
:
json
)
{
ParticipantInfo
pInfo
;
if
(
!
participantInfo
.
isMember
(
"uri"
))
continue
;
pInfo
.
fromJson
(
participantInfo
);
newInfo
.
emplace_back
(
pInfo
);
if
(
json
.
isObject
())
{
// new confInfo
if
(
json
.
isMember
(
"p"
))
{
for
(
const
auto
&
participantInfo
:
json
[
"p"
])
{
ParticipantInfo
pInfo
;
if
(
!
participantInfo
.
isMember
(
"uri"
))
continue
;
pInfo
.
fromJson
(
participantInfo
);
newInfo
.
emplace_back
(
pInfo
);
}
}
if
(
json
.
isMember
(
"w"
))
newInfo
.
w
=
json
[
"w"
].
asInt
();
if
(
json
.
isMember
(
"h"
))
newInfo
.
h
=
json
[
"h"
].
asInt
();
}
else
{
// old confInfo
for
(
const
auto
&
participantInfo
:
json
)
{
ParticipantInfo
pInfo
;
if
(
!
participantInfo
.
isMember
(
"uri"
))
continue
;
pInfo
.
fromJson
(
participantInfo
);
newInfo
.
emplace_back
(
pInfo
);
}
}
}
...
...
This diff is collapsed.
Click to expand it.
src/conference.h
+
2
−
0
View file @
f35992be
...
...
@@ -111,6 +111,8 @@ struct ParticipantInfo
struct
ConfInfo
:
public
std
::
vector
<
ParticipantInfo
>
{
std
::
vector
<
std
::
map
<
std
::
string
,
std
::
string
>>
toVectorMapStringString
()
const
;
int
h
{
0
};
int
w
{
0
};
};
using
ParticipantSet
=
std
::
set
<
std
::
string
>
;
...
...
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