Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linphone-desktop
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
linphone-desktop
Commits
13e4822e
Commit
13e4822e
authored
May 24, 2017
by
Ronan Abhamon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(ui/views/App/Calls/ConferenceManager): in progress
parent
ce03c3f1
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
331 additions
and
9 deletions
+331
-9
en.ts
linphone-desktop/assets/languages/en.ts
+11
-0
fr.ts
linphone-desktop/assets/languages/fr.ts
+11
-0
resources.qrc
linphone-desktop/resources.qrc
+1
-0
CallModel.cpp
linphone-desktop/src/components/call/CallModel.cpp
+11
-9
ConferenceModel.cpp
...one-desktop/src/components/conference/ConferenceModel.cpp
+61
-0
ConferenceModel.hpp
...one-desktop/src/components/conference/ConferenceModel.hpp
+20
-0
Conference.qml
linphone-desktop/ui/views/App/Calls/Conference.qml
+216
-0
No files found.
linphone-desktop/assets/languages/en.ts
View file @
13e4822e
...
...
@@ -357,6 +357,17 @@ Server url not configured.</translation>
<
translation
>
Status
<
/translation
>
<
/message
>
<
/context
>
<
context
>
<
name
>
Conference
<
/name
>
<
message
>
<
source
>
conferenceTitle
<
/source
>
<
translation
>
CONFERENCE
<
/translation
>
<
/message
>
<
message
>
<
source
>
pendingRequestLabel
<
/source
>
<
translation
>
Please
to
wait
,
a
request
is
pending
.
<
/translation
>
<
/message
>
<
/context
>
<
context
>
<
name
>
ConferenceManager
<
/name
>
<
message
>
...
...
linphone-desktop/assets/languages/fr.ts
View file @
13e4822e
...
...
@@ -357,6 +357,17 @@ Url du serveur non configurée.</translation>
<
translation
>
Status
<
/translation
>
<
/message
>
<
/context
>
<
context
>
<
name
>
Conference
<
/name
>
<
message
>
<
source
>
conferenceTitle
<
/source
>
<
translation
>
CONF
É
RENCE
<
/translation
>
<
/message
>
<
message
>
<
source
>
pendingRequestLabel
<
/source
>
<
translation
>
Merci
de
patienter
,
une
requ
ê
te
est
en
attente
.
<
/translation
>
<
/message
>
<
/context
>
<
context
>
<
name
>
ConferenceManager
<
/name
>
<
message
>
...
...
linphone-desktop/resources.qrc
View file @
13e4822e
...
...
@@ -355,6 +355,7 @@
<file>
ui/views/App/Calls/CallsWindow.js
</file>
<file>
ui/views/App/Calls/CallsWindow.qml
</file>
<file>
ui/views/App/Calls/ConferenceManager.qml
</file>
<file>
ui/views/App/Calls/Conference.qml
</file>
<file>
ui/views/App/Calls/EndedCall.qml
</file>
<file>
ui/views/App/Calls/IncallFullscreenWindow.qml
</file>
<file>
ui/views/App/Calls/Incall.js
</file>
...
...
linphone-desktop/src/components/call/CallModel.cpp
View file @
13e4822e
...
...
@@ -79,9 +79,10 @@ QString CallModel::getSipAddress () const {
void
CallModel
::
setRecordFile
(
shared_ptr
<
linphone
::
CallParams
>
&
callParams
)
{
callParams
->
setRecordFile
(
::
Utils
::
qStringToLinphoneString
(
CoreManager
::
getInstance
()
->
getSettingsModel
()
->
getSavedVideosFolder
()
+
QDateTime
::
currentDateTime
().
toString
(
"yyyy-MM-dd_hh:mm:ss"
)
)
+
".mkv"
QStringLiteral
(
"%1%2.mkv"
)
.
arg
(
CoreManager
::
getInstance
()
->
getSettingsModel
()
->
getSavedVideosFolder
())
.
arg
(
QDateTime
::
currentDateTime
().
toString
(
"yyyy-MM-dd_hh:mm:ss"
))
)
);
}
...
...
@@ -183,14 +184,15 @@ void CallModel::startRecording () {
}
void
CallModel
::
stopRecording
()
{
if
(
mRecording
)
{
qInfo
()
<<
QStringLiteral
(
"Stop recording call:"
)
<<
this
;
if
(
!
mRecording
)
return
;
mRecording
=
false
;
mCall
->
stopRecording
();
qInfo
()
<<
QStringLiteral
(
"Stop recording call:"
)
<<
this
;
emit
recordingChanged
(
false
);
}
mRecording
=
false
;
mCall
->
stopRecording
();
emit
recordingChanged
(
false
);
}
// -----------------------------------------------------------------------------
...
...
linphone-desktop/src/components/conference/ConferenceModel.cpp
View file @
13e4822e
...
...
@@ -20,8 +20,15 @@
* Author: Ronan Abhamon
*/
#include <QDateTime>
#include "../../Utils.hpp"
#include "../core/CoreManager.hpp"
#include "ConferenceModel.hpp"
using
namespace
std
;
// =============================================================================
ConferenceModel
::
ConferenceModel
(
QObject
*
parent
)
:
QAbstractListModel
(
parent
)
{}
...
...
@@ -47,3 +54,57 @@ QVariant ConferenceModel::data (const QModelIndex &index, int role) const {
return
QVariant
();
}
// -----------------------------------------------------------------------------
void
ConferenceModel
::
startRecording
()
{
if
(
mRecording
)
return
;
qInfo
()
<<
QStringLiteral
(
"Start recording conference:"
)
<<
this
;
CoreManager
*
coreManager
=
CoreManager
::
getInstance
();
coreManager
->
getCore
()
->
startConferenceRecording
(
::
Utils
::
qStringToLinphoneString
(
QStringLiteral
(
"%1%2.mkv"
)
.
arg
(
coreManager
->
getSettingsModel
()
->
getSavedVideosFolder
())
.
arg
(
QDateTime
::
currentDateTime
().
toString
(
"yyyy-MM-dd_hh:mm:ss"
))
)
);
mRecording
=
true
;
emit
recordingChanged
(
true
);
}
void
ConferenceModel
::
stopRecording
()
{
if
(
!
mRecording
)
return
;
qInfo
()
<<
QStringLiteral
(
"Stop recording conference:"
)
<<
this
;
mRecording
=
false
;
CoreManager
::
getInstance
()
->
getCore
()
->
stopConferenceRecording
();
emit
recordingChanged
(
false
);
}
// -----------------------------------------------------------------------------
bool
ConferenceModel
::
getMicroMuted
()
const
{
return
!
CoreManager
::
getInstance
()
->
getCore
()
->
micEnabled
();
}
void
ConferenceModel
::
setMicroMuted
(
bool
status
)
{
shared_ptr
<
linphone
::
Core
>
core
=
CoreManager
::
getInstance
()
->
getCore
();
if
(
status
==
core
->
micEnabled
())
{
core
->
enableMic
(
!
status
);
emit
microMutedChanged
(
status
);
}
}
// -----------------------------------------------------------------------------
bool
ConferenceModel
::
getRecording
()
const
{
return
mRecording
;
}
linphone-desktop/src/components/conference/ConferenceModel.hpp
View file @
13e4822e
...
...
@@ -28,6 +28,12 @@
// =============================================================================
class
ConferenceModel
:
public
QAbstractListModel
{
Q_OBJECT
;
Q_PROPERTY
(
bool
microMuted
READ
getMicroMuted
WRITE
setMicroMuted
NOTIFY
microMutedChanged
);
Q_PROPERTY
(
bool
recording
READ
getRecording
NOTIFY
recordingChanged
);
public:
ConferenceModel
(
QObject
*
parent
=
Q_NULLPTR
);
~
ConferenceModel
()
=
default
;
...
...
@@ -37,7 +43,21 @@ public:
QHash
<
int
,
QByteArray
>
roleNames
()
const
override
;
QVariant
data
(
const
QModelIndex
&
index
,
int
role
=
Qt
::
DisplayRole
)
const
override
;
Q_INVOKABLE
void
startRecording
();
Q_INVOKABLE
void
stopRecording
();
signals:
void
microMutedChanged
(
bool
status
);
void
recordingChanged
(
bool
status
);
private:
bool
getMicroMuted
()
const
;
void
setMicroMuted
(
bool
status
);
bool
getRecording
()
const
;
bool
mRecording
=
false
;
QStringList
mSipAddresses
;
};
...
...
linphone-desktop/ui/views/App/Calls/Conference.qml
0 → 100644
View file @
13e4822e
import
QtQuick
2.7
import
QtQuick
.
Controls
2.1
import
QtQuick
.
Layouts
1.3
import
Common
1.0
import
Linphone
1.0
import
LinphoneUtils
1.0
import
Utils
1.0
import
App
.
Styles
1.0
//import 'Conference.js' as Logic
// =============================================================================
Rectangle
{
property
var
call
:
null
// TODO: Remove me
color
:
CallStyle
.
backgroundColor
// ---------------------------------------------------------------------------
ConferenceModel
{
id
:
conference
}
ColumnLayout
{
anchors
{
fill
:
parent
topMargin
:
CallStyle
.
header
.
topMargin
}
spacing
:
0
// -------------------------------------------------------------------------
// Call info.
// -------------------------------------------------------------------------
Item
{
id
:
info
Layout.fillWidth
:
true
Layout.leftMargin
:
CallStyle
.
header
.
leftMargin
Layout.rightMargin
:
CallStyle
.
header
.
rightMargin
Layout.preferredHeight
:
CallStyle
.
header
.
conferenceDescription
.
height
ActionBar
{
id
:
leftActions
anchors.left
:
parent
.
left
iconSize
:
CallStyle
.
header
.
iconSize
}
Text
{
id
:
conferenceDescription
anchors.centerIn
:
parent
horizontalAlignment
:
Text
.
AlignHCenter
text
:
qsTr
(
'
conferenceTitle
'
)
height
:
parent
.
height
width
:
parent
.
width
-
rightActions
.
width
-
leftActions
.
width
-
CallStyle
.
header
.
conferenceDescription
.
width
}
// -----------------------------------------------------------------------
// Video actions.
// -----------------------------------------------------------------------
ActionBar
{
id
:
rightActions
anchors.right
:
parent
.
right
iconSize
:
CallStyle
.
header
.
iconSize
ActionSwitch
{
enabled
:
conference
.
recording
icon
:
'
record
'
useStates
:
false
onClicked
:
!
enabled
?
conference
.
startRecording
()
:
conference
.
stopRecording
()
}
}
}
Text
{
id
:
elapsedTime
Layout.fillWidth
:
true
color
:
CallStyle
.
header
.
elapsedTime
.
color
font.pointSize
:
CallStyle
.
header
.
elapsedTime
.
fontSize
horizontalAlignment
:
Text
.
AlignHCenter
Timer
{
interval
:
1000
repeat
:
true
running
:
true
triggeredOnStart
:
true
onTriggered
:
elapsedTime
.
text
=
Utils
.
formatElapsedTime
(
conference
.
duration
)
}
}
// -------------------------------------------------------------------------
// Contacts visual.
// -------------------------------------------------------------------------
Item
{
id
:
container
Layout.fillWidth
:
true
Layout.fillHeight
:
true
Layout.margins
:
CallStyle
.
container
.
margins
}
// -------------------------------------------------------------------------
// Action Buttons.
// -------------------------------------------------------------------------
Item
{
Layout.fillWidth
:
true
Layout.preferredHeight
:
CallStyle
.
actionArea
.
height
RowLayout
{
anchors
{
left
:
parent
.
left
leftMargin
:
CallStyle
.
actionArea
.
leftButtonsGroupMargin
verticalCenter
:
parent
.
verticalCenter
}
spacing
:
ActionBarStyle
.
spacing
Row
{
spacing
:
CallStyle
.
actionArea
.
vu
.
spacing
VuMeter
{
Timer
{
interval
:
50
repeat
:
true
running
:
micro
.
enabled
onTriggered
:
parent
.
value
=
conference
.
microVu
}
enabled
:
micro
.
enabled
}
ActionSwitch
{
id
:
micro
enabled
:
!
conference
.
microMuted
icon
:
'
micro
'
iconSize
:
CallStyle
.
actionArea
.
iconSize
onClicked
:
conference
.
microMuted
=
enabled
}
}
Row
{
spacing
:
CallStyle
.
actionArea
.
vu
.
spacing
VuMeter
{
Timer
{
interval
:
50
repeat
:
true
running
:
speaker
.
enabled
onTriggered
:
parent
.
value
=
conference
.
speakerVu
}
enabled
:
speaker
.
enabled
}
ActionSwitch
{
id
:
speaker
enabled
:
true
icon
:
'
speaker
'
iconSize
:
CallStyle
.
actionArea
.
iconSize
onClicked
:
console
.
log
(
'
TODO
'
)
}
}
}
ActionBar
{
anchors
{
right
:
parent
.
right
rightMargin
:
CallStyle
.
actionArea
.
rightButtonsGroupMargin
verticalCenter
:
parent
.
verticalCenter
}
iconSize
:
CallStyle
.
actionArea
.
iconSize
ActionSwitch
{
enabled
:
!
conference
.
pausedByUser
icon
:
'
pause
'
updating
:
conference
.
updating
onClicked
:
conference
.
pausedByUser
=
enabled
TooltipArea
{
text
:
qsTr
(
'
pendingRequestLabel
'
)
visible
:
parent
.
updating
}
}
ActionButton
{
icon
:
'
hangup
'
onClicked
:
conference
.
terminate
()
}
}
}
}
}
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