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
336abb50
Commit
336abb50
authored
Apr 04, 2017
by
Ronan Abhamon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(src/components/codecs/CodecsModel): in progress
parent
f91aaf01
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
3 deletions
+9
-3
CodecsModel.cpp
linphone-desktop/src/components/codecs/CodecsModel.cpp
+8
-2
CodecsModel.hpp
linphone-desktop/src/components/codecs/CodecsModel.hpp
+1
-1
No files found.
linphone-desktop/src/components/codecs/CodecsModel.cpp
View file @
336abb50
...
...
@@ -28,7 +28,7 @@
// ============================================================================
template
<
typename
T
>
inline
void
addCodecToList
(
Q
VariantList
&
list
,
const
T
&
codec
,
CodecsModel
::
CodecType
type
)
{
inline
void
addCodecToList
(
Q
List
<
QVariantMap
>
&
list
,
const
T
&
codec
,
CodecsModel
::
CodecType
type
)
{
QVariantMap
map
;
map
[
"bitrate"
]
=
codec
->
getNormalBitrate
();
...
...
@@ -89,6 +89,12 @@ QVariant CodecsModel::data (const QModelIndex &index, int role) const {
void
CodecsModel
::
enableCodec
(
int
id
,
bool
status
)
{
Q_ASSERT
(
id
>=
0
&&
id
<
m_codecs
.
count
());
shared_ptr
<
linphone
::
PayloadType
>
codec
=
m_codecs
[
id
].
toMap
().
value
(
"__codec"
).
value
<
shared_ptr
<
linphone
::
PayloadType
>
>
();
QVariantMap
&
map
=
m_codecs
[
id
];
shared_ptr
<
linphone
::
PayloadType
>
codec
=
map
.
value
(
"__codec"
).
value
<
shared_ptr
<
linphone
::
PayloadType
>
>
();
codec
->
enable
(
status
);
map
[
"enabled"
]
=
status
;
emit
dataChanged
(
index
(
id
,
0
),
index
(
id
,
0
));
}
linphone-desktop/src/components/codecs/CodecsModel.hpp
View file @
336abb50
...
...
@@ -56,7 +56,7 @@ public:
void
enableCodec
(
int
id
,
bool
status
);
private:
Q
VariantList
m_codecs
;
Q
List
<
QVariantMap
>
m_codecs
;
};
Q_DECLARE_METATYPE
(
std
::
shared_ptr
<
linphone
::
PayloadType
>
);
...
...
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