Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
savoirfairelinux
jami-lrc
Commits
c51772f9
Unverified
Commit
c51772f9
authored
Jul 21, 2020
by
Sébastien Blin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
conference: add ability to change layouts
Change-Id: I40ac23ccf29a0a138f5c759db59b2760d830fa45
parent
7af0cb82
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
54 additions
and
0 deletions
+54
-0
src/api/call.h
src/api/call.h
+7
-0
src/api/newcallmodel.h
src/api/newcallmodel.h
+10
-0
src/newcallmodel.cpp
src/newcallmodel.cpp
+27
-0
src/qtwrapper/callmanager_wrap.h
src/qtwrapper/callmanager_wrap.h
+10
-0
No files found.
src/api/call.h
View file @
c51772f9
...
...
@@ -125,6 +125,12 @@ enum class Type {
CONFERENCE
};
enum
class
Layout
{
GRID
,
ONE_WITH_SMALL
,
ONE
};
struct
Info
{
QString
id
;
...
...
@@ -136,6 +142,7 @@ struct Info
bool
audioMuted
=
false
;
bool
videoMuted
=
false
;
bool
isAudioOnly
=
false
;
Layout
layout
=
Layout
::
GRID
;
};
static
inline
bool
...
...
src/api/newcallmodel.h
View file @
c51772f9
...
...
@@ -225,6 +225,16 @@ public:
*/
void
setCurrentCall
(
const
QString
&
callId
)
const
;
/**
* Change the conference layout
*/
void
setConferenceLayout
(
const
QString
&
confId
,
const
call
::
Layout
&
layout
);
/**
* Set the shown participant
*/
void
setActiveParticipant
(
const
QString
&
confId
,
const
QString
&
participant
);
Q_SIGNALS:
/**
* Emitted when a call state changes
...
...
src/newcallmodel.cpp
View file @
c51772f9
...
...
@@ -629,6 +629,33 @@ NewCallModel::setCurrentCall(const QString& callId) const
}
}
void
NewCallModel
::
setConferenceLayout
(
const
QString
&
confId
,
const
call
::
Layout
&
layout
)
{
auto
call
=
pimpl_
->
calls
.
find
(
confId
);
if
(
call
!=
pimpl_
->
calls
.
end
())
{
switch
(
layout
)
{
case
call
::
Layout
::
GRID
:
CallManager
::
instance
().
setConferenceLayout
(
confId
,
0
);
break
;
case
call
::
Layout
::
ONE_WITH_SMALL
:
CallManager
::
instance
().
setConferenceLayout
(
confId
,
1
);
break
;
case
call
::
Layout
::
ONE
:
CallManager
::
instance
().
setConferenceLayout
(
confId
,
2
);
break
;
}
call
->
second
->
layout
=
layout
;
}
}
void
NewCallModel
::
setActiveParticipant
(
const
QString
&
confId
,
const
QString
&
participant
)
{
CallManager
::
instance
().
setActiveParticipant
(
confId
,
participant
);
}
void
NewCallModel
::
sendSipMessage
(
const
QString
&
callId
,
const
QString
&
body
)
const
{
...
...
src/qtwrapper/callmanager_wrap.h
View file @
c51772f9
...
...
@@ -363,6 +363,16 @@ public Q_SLOTS: // METHODS
DRing
::
stopSmartInfo
();
}
void
setConferenceLayout
(
const
QString
&
confId
,
int
layout
)
{
DRing
::
setConferenceLayout
(
confId
.
toStdString
(),
layout
);
}
void
setActiveParticipant
(
const
QString
&
confId
,
const
QString
&
callId
)
{
DRing
::
setActiveParticipant
(
confId
.
toStdString
(),
callId
.
toStdString
());
}
bool
switchInput
(
const
QString
&
callId
,
const
QString
&
resource
)
{
#ifdef ENABLE_VIDEO
...
...
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