Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
savoirfairelinux
jami-daemon
Commits
f6dc68db
Commit
f6dc68db
authored
May 23, 2019
by
Adrien Béraud
Committed by
Sébastien Blin
May 24, 2019
Browse files
string utils: remove to_string
Change-Id: If34adb4833dff7ea71175bb7f465f48cb3758d55
parent
fbafa847
Changes
20
Hide whitespace changes
Inline
Side-by-side
src/account.cpp
View file @
f6dc68db
...
@@ -312,7 +312,7 @@ Account::getAccountDetails() const
...
@@ -312,7 +312,7 @@ Account::getAccountDetails() const
{
Conf
::
CONFIG_ACCOUNT_USERAGENT
,
hasCustomUserAgent_
?
userAgent_
:
DEFAULT_USER_AGENT
},
{
Conf
::
CONFIG_ACCOUNT_USERAGENT
,
hasCustomUserAgent_
?
userAgent_
:
DEFAULT_USER_AGENT
},
{
Conf
::
CONFIG_ACCOUNT_HAS_CUSTOM_USERAGENT
,
hasCustomUserAgent_
?
userAgent_
:
DEFAULT_USER_AGENT
},
{
Conf
::
CONFIG_ACCOUNT_HAS_CUSTOM_USERAGENT
,
hasCustomUserAgent_
?
userAgent_
:
DEFAULT_USER_AGENT
},
{
Conf
::
CONFIG_ACCOUNT_AUTOANSWER
,
autoAnswerEnabled_
?
TRUE_STR
:
FALSE_STR
},
{
Conf
::
CONFIG_ACCOUNT_AUTOANSWER
,
autoAnswerEnabled_
?
TRUE_STR
:
FALSE_STR
},
{
DRing
::
Account
::
ConfProperties
::
ACTIVE_CALL_LIMIT
,
jami
::
to_string
(
activeCallLimit_
)},
{
DRing
::
Account
::
ConfProperties
::
ACTIVE_CALL_LIMIT
,
std
::
to_string
(
activeCallLimit_
)},
{
Conf
::
CONFIG_RINGTONE_ENABLED
,
ringtoneEnabled_
?
TRUE_STR
:
FALSE_STR
},
{
Conf
::
CONFIG_RINGTONE_ENABLED
,
ringtoneEnabled_
?
TRUE_STR
:
FALSE_STR
},
{
Conf
::
CONFIG_RINGTONE_PATH
,
ringtonePath_
},
{
Conf
::
CONFIG_RINGTONE_PATH
,
ringtonePath_
},
{
Conf
::
CONFIG_UPNP_ENABLED
,
upnp_
?
TRUE_STR
:
FALSE_STR
}
{
Conf
::
CONFIG_UPNP_ENABLED
,
upnp_
?
TRUE_STR
:
FALSE_STR
}
...
...
src/call.cpp
View file @
f6dc68db
...
@@ -336,12 +336,12 @@ std::map<std::string, std::string>
...
@@ -336,12 +336,12 @@ std::map<std::string, std::string>
Call
::
getDetails
()
const
Call
::
getDetails
()
const
{
{
return
{
return
{
{
DRing
::
Call
::
Details
::
CALL_TYPE
,
jami
::
to_string
((
unsigned
)
type_
)},
{
DRing
::
Call
::
Details
::
CALL_TYPE
,
std
::
to_string
((
unsigned
)
type_
)},
{
DRing
::
Call
::
Details
::
PEER_NUMBER
,
peerNumber_
},
{
DRing
::
Call
::
Details
::
PEER_NUMBER
,
peerNumber_
},
{
DRing
::
Call
::
Details
::
DISPLAY_NAME
,
peerDisplayName_
},
{
DRing
::
Call
::
Details
::
DISPLAY_NAME
,
peerDisplayName_
},
{
DRing
::
Call
::
Details
::
CALL_STATE
,
getStateStr
()},
{
DRing
::
Call
::
Details
::
CALL_STATE
,
getStateStr
()},
{
DRing
::
Call
::
Details
::
CONF_ID
,
confID_
},
{
DRing
::
Call
::
Details
::
CONF_ID
,
confID_
},
{
DRing
::
Call
::
Details
::
TIMESTAMP_START
,
jami
::
to_string
(
timestamp_start_
)},
{
DRing
::
Call
::
Details
::
TIMESTAMP_START
,
std
::
to_string
(
timestamp_start_
)},
{
DRing
::
Call
::
Details
::
ACCOUNTID
,
getAccountId
()},
{
DRing
::
Call
::
Details
::
ACCOUNTID
,
getAccountId
()},
{
DRing
::
Call
::
Details
::
AUDIO_MUTED
,
std
::
string
(
bool_to_str
(
isAudioMuted_
))},
{
DRing
::
Call
::
Details
::
AUDIO_MUTED
,
std
::
string
(
bool_to_str
(
isAudioMuted_
))},
{
DRing
::
Call
::
Details
::
VIDEO_MUTED
,
std
::
string
(
bool_to_str
(
isVideoMuted_
))},
{
DRing
::
Call
::
Details
::
VIDEO_MUTED
,
std
::
string
(
bool_to_str
(
isVideoMuted_
))},
...
...
src/client/videomanager.cpp
View file @
f6dc68db
...
@@ -515,8 +515,8 @@ getRenderer(const std::string& callId)
...
@@ -515,8 +515,8 @@ getRenderer(const std::string& callId)
return
{
return
{
{
DRing
::
Media
::
Details
::
CALL_ID
,
callId
},
{
DRing
::
Media
::
Details
::
CALL_ID
,
callId
},
{
DRing
::
Media
::
Details
::
SHM_PATH
,
sink
->
openedName
()},
{
DRing
::
Media
::
Details
::
SHM_PATH
,
sink
->
openedName
()},
{
DRing
::
Media
::
Details
::
WIDTH
,
jami
::
to_string
(
sink
->
getWidth
())},
{
DRing
::
Media
::
Details
::
WIDTH
,
std
::
to_string
(
sink
->
getWidth
())},
{
DRing
::
Media
::
Details
::
HEIGHT
,
jami
::
to_string
(
sink
->
getHeight
())},
{
DRing
::
Media
::
Details
::
HEIGHT
,
std
::
to_string
(
sink
->
getHeight
())},
};
};
else
else
return
{
return
{
...
...
src/jamidht/jamiaccount.cpp
View file @
f6dc68db
...
@@ -1588,7 +1588,7 @@ JamiAccount::getAccountDetails() const
...
@@ -1588,7 +1588,7 @@ JamiAccount::getAccountDetails() const
{
{
std
::
lock_guard
<
std
::
mutex
>
lock
(
configurationMutex_
);
std
::
lock_guard
<
std
::
mutex
>
lock
(
configurationMutex_
);
std
::
map
<
std
::
string
,
std
::
string
>
a
=
SIPAccountBase
::
getAccountDetails
();
std
::
map
<
std
::
string
,
std
::
string
>
a
=
SIPAccountBase
::
getAccountDetails
();
a
.
emplace
(
Conf
::
CONFIG_DHT_PORT
,
jami
::
to_string
(
dhtPort_
));
a
.
emplace
(
Conf
::
CONFIG_DHT_PORT
,
std
::
to_string
(
dhtPort_
));
a
.
emplace
(
Conf
::
CONFIG_DHT_PUBLIC_IN_CALLS
,
dhtPublicInCalls_
?
TRUE_STR
:
FALSE_STR
);
a
.
emplace
(
Conf
::
CONFIG_DHT_PUBLIC_IN_CALLS
,
dhtPublicInCalls_
?
TRUE_STR
:
FALSE_STR
);
a
.
emplace
(
DRing
::
Account
::
ConfProperties
::
DHT_PEER_DISCOVERY
,
dhtPeerDiscovery_
?
TRUE_STR
:
FALSE_STR
);
a
.
emplace
(
DRing
::
Account
::
ConfProperties
::
DHT_PEER_DISCOVERY
,
dhtPeerDiscovery_
?
TRUE_STR
:
FALSE_STR
);
a
.
emplace
(
DRing
::
Account
::
ConfProperties
::
RING_DEVICE_ID
,
ringDeviceId_
);
a
.
emplace
(
DRing
::
Account
::
ConfProperties
::
RING_DEVICE_ID
,
ringDeviceId_
);
...
...
src/jamidht/namedirectory.cpp
View file @
f6dc68db
...
@@ -314,7 +314,7 @@ void NameDirectory::registerName(const std::string& addr, const std::string& n,
...
@@ -314,7 +314,7 @@ void NameDirectory::registerName(const std::string& addr, const std::string& n,
body
=
ss
.
str
();
body
=
ss
.
str
();
}
}
request
->
set_body
(
body
);
request
->
set_body
(
body
);
request
->
set_header
(
"Content-Length"
,
jami
::
to_string
(
body
.
size
()));
request
->
set_header
(
"Content-Length"
,
std
::
to_string
(
body
.
size
()));
auto
params
=
std
::
make_shared
<
restbed
::
Settings
>
();
auto
params
=
std
::
make_shared
<
restbed
::
Settings
>
();
params
->
set_connection_timeout
(
std
::
chrono
::
seconds
(
120
));
params
->
set_connection_timeout
(
std
::
chrono
::
seconds
(
120
));
...
...
src/manager.cpp
View file @
f6dc68db
...
@@ -2686,12 +2686,12 @@ Manager::testAccountICEInitialization(const std::string& accountID)
...
@@ -2686,12 +2686,12 @@ Manager::testAccountICEInitialization(const std::string& accountID)
if
(
ice
->
waitForInitialization
(
ICE_INIT_TIMEOUT
)
<=
0
)
if
(
ice
->
waitForInitialization
(
ICE_INIT_TIMEOUT
)
<=
0
)
{
{
result
[
"STATUS"
]
=
jami
::
to_string
((
int
)
DRing
::
Account
::
testAccountICEInitializationStatus
::
FAILURE
);
result
[
"STATUS"
]
=
std
::
to_string
((
int
)
DRing
::
Account
::
testAccountICEInitializationStatus
::
FAILURE
);
result
[
"MESSAGE"
]
=
ice
->
getLastErrMsg
();
result
[
"MESSAGE"
]
=
ice
->
getLastErrMsg
();
}
}
else
else
{
{
result
[
"STATUS"
]
=
jami
::
to_string
((
int
)
DRing
::
Account
::
testAccountICEInitializationStatus
::
SUCCESS
);
result
[
"STATUS"
]
=
std
::
to_string
((
int
)
DRing
::
Account
::
testAccountICEInitializationStatus
::
SUCCESS
);
result
[
"MESSAGE"
]
=
""
;
result
[
"MESSAGE"
]
=
""
;
}
}
...
...
src/media/media_codec.cpp
View file @
f6dc68db
...
@@ -86,9 +86,9 @@ SystemAudioCodecInfo::getCodecSpecifications()
...
@@ -86,9 +86,9 @@ SystemAudioCodecInfo::getCodecSpecifications()
return
{
return
{
{
DRing
::
Account
::
ConfProperties
::
CodecInfo
::
NAME
,
name
},
{
DRing
::
Account
::
ConfProperties
::
CodecInfo
::
NAME
,
name
},
{
DRing
::
Account
::
ConfProperties
::
CodecInfo
::
TYPE
,
(
mediaType
&
MEDIA_AUDIO
?
"AUDIO"
:
"VIDEO"
)},
{
DRing
::
Account
::
ConfProperties
::
CodecInfo
::
TYPE
,
(
mediaType
&
MEDIA_AUDIO
?
"AUDIO"
:
"VIDEO"
)},
{
DRing
::
Account
::
ConfProperties
::
CodecInfo
::
BITRATE
,
to_string
(
bitrate
)},
{
DRing
::
Account
::
ConfProperties
::
CodecInfo
::
BITRATE
,
std
::
to_string
(
bitrate
)},
{
DRing
::
Account
::
ConfProperties
::
CodecInfo
::
SAMPLE_RATE
,
to_string
(
audioformat
.
sample_rate
)},
{
DRing
::
Account
::
ConfProperties
::
CodecInfo
::
SAMPLE_RATE
,
std
::
to_string
(
audioformat
.
sample_rate
)},
{
DRing
::
Account
::
ConfProperties
::
CodecInfo
::
CHANNEL_NUMBER
,
to_string
(
audioformat
.
nb_channels
)}
{
DRing
::
Account
::
ConfProperties
::
CodecInfo
::
CHANNEL_NUMBER
,
std
::
to_string
(
audioformat
.
nb_channels
)}
};
};
}
}
...
@@ -119,10 +119,10 @@ SystemVideoCodecInfo::getCodecSpecifications()
...
@@ -119,10 +119,10 @@ SystemVideoCodecInfo::getCodecSpecifications()
return
{
return
{
{
DRing
::
Account
::
ConfProperties
::
CodecInfo
::
NAME
,
name
},
{
DRing
::
Account
::
ConfProperties
::
CodecInfo
::
NAME
,
name
},
{
DRing
::
Account
::
ConfProperties
::
CodecInfo
::
TYPE
,
(
mediaType
&
MEDIA_AUDIO
?
"AUDIO"
:
"VIDEO"
)},
{
DRing
::
Account
::
ConfProperties
::
CodecInfo
::
TYPE
,
(
mediaType
&
MEDIA_AUDIO
?
"AUDIO"
:
"VIDEO"
)},
{
DRing
::
Account
::
ConfProperties
::
CodecInfo
::
BITRATE
,
to_string
(
bitrate
)},
{
DRing
::
Account
::
ConfProperties
::
CodecInfo
::
BITRATE
,
std
::
to_string
(
bitrate
)},
{
DRing
::
Account
::
ConfProperties
::
CodecInfo
::
FRAME_RATE
,
to_string
(
frameRate
)},
{
DRing
::
Account
::
ConfProperties
::
CodecInfo
::
FRAME_RATE
,
std
::
to_string
(
frameRate
)},
{
DRing
::
Account
::
ConfProperties
::
CodecInfo
::
MIN_BITRATE
,
to_string
(
minBitrate
)},
{
DRing
::
Account
::
ConfProperties
::
CodecInfo
::
MIN_BITRATE
,
std
::
to_string
(
minBitrate
)},
{
DRing
::
Account
::
ConfProperties
::
CodecInfo
::
MAX_BITRATE
,
to_string
(
maxBitrate
)},
{
DRing
::
Account
::
ConfProperties
::
CodecInfo
::
MAX_BITRATE
,
std
::
to_string
(
maxBitrate
)},
};
};
}
}
...
@@ -161,9 +161,9 @@ AccountAudioCodecInfo::getCodecSpecifications()
...
@@ -161,9 +161,9 @@ AccountAudioCodecInfo::getCodecSpecifications()
return
{
return
{
{
DRing
::
Account
::
ConfProperties
::
CodecInfo
::
NAME
,
systemCodecInfo
.
name
},
{
DRing
::
Account
::
ConfProperties
::
CodecInfo
::
NAME
,
systemCodecInfo
.
name
},
{
DRing
::
Account
::
ConfProperties
::
CodecInfo
::
TYPE
,
(
systemCodecInfo
.
mediaType
&
MEDIA_AUDIO
?
"AUDIO"
:
"VIDEO"
)},
{
DRing
::
Account
::
ConfProperties
::
CodecInfo
::
TYPE
,
(
systemCodecInfo
.
mediaType
&
MEDIA_AUDIO
?
"AUDIO"
:
"VIDEO"
)},
{
DRing
::
Account
::
ConfProperties
::
CodecInfo
::
BITRATE
,
to_string
(
bitrate
)},
{
DRing
::
Account
::
ConfProperties
::
CodecInfo
::
BITRATE
,
std
::
to_string
(
bitrate
)},
{
DRing
::
Account
::
ConfProperties
::
CodecInfo
::
SAMPLE_RATE
,
to_string
(
audioformat
.
sample_rate
)},
{
DRing
::
Account
::
ConfProperties
::
CodecInfo
::
SAMPLE_RATE
,
std
::
to_string
(
audioformat
.
sample_rate
)},
{
DRing
::
Account
::
ConfProperties
::
CodecInfo
::
CHANNEL_NUMBER
,
to_string
(
audioformat
.
nb_channels
)}
{
DRing
::
Account
::
ConfProperties
::
CodecInfo
::
CHANNEL_NUMBER
,
std
::
to_string
(
audioformat
.
nb_channels
)}
};
};
}
}
...
@@ -197,13 +197,13 @@ AccountVideoCodecInfo::getCodecSpecifications()
...
@@ -197,13 +197,13 @@ AccountVideoCodecInfo::getCodecSpecifications()
return
{
return
{
{
DRing
::
Account
::
ConfProperties
::
CodecInfo
::
NAME
,
systemCodecInfo
.
name
},
{
DRing
::
Account
::
ConfProperties
::
CodecInfo
::
NAME
,
systemCodecInfo
.
name
},
{
DRing
::
Account
::
ConfProperties
::
CodecInfo
::
TYPE
,
(
systemCodecInfo
.
mediaType
&
MEDIA_AUDIO
?
"AUDIO"
:
"VIDEO"
)},
{
DRing
::
Account
::
ConfProperties
::
CodecInfo
::
TYPE
,
(
systemCodecInfo
.
mediaType
&
MEDIA_AUDIO
?
"AUDIO"
:
"VIDEO"
)},
{
DRing
::
Account
::
ConfProperties
::
CodecInfo
::
BITRATE
,
to_string
(
bitrate
)},
{
DRing
::
Account
::
ConfProperties
::
CodecInfo
::
BITRATE
,
std
::
to_string
(
bitrate
)},
{
DRing
::
Account
::
ConfProperties
::
CodecInfo
::
MAX_BITRATE
,
to_string
(
systemCodecInfo
.
maxBitrate
)},
{
DRing
::
Account
::
ConfProperties
::
CodecInfo
::
MAX_BITRATE
,
std
::
to_string
(
systemCodecInfo
.
maxBitrate
)},
{
DRing
::
Account
::
ConfProperties
::
CodecInfo
::
MIN_BITRATE
,
to_string
(
systemCodecInfo
.
minBitrate
)},
{
DRing
::
Account
::
ConfProperties
::
CodecInfo
::
MIN_BITRATE
,
std
::
to_string
(
systemCodecInfo
.
minBitrate
)},
{
DRing
::
Account
::
ConfProperties
::
CodecInfo
::
QUALITY
,
to_string
(
quality
)},
{
DRing
::
Account
::
ConfProperties
::
CodecInfo
::
QUALITY
,
std
::
to_string
(
quality
)},
{
DRing
::
Account
::
ConfProperties
::
CodecInfo
::
MAX_QUALITY
,
to_string
(
systemCodecInfo
.
maxQuality
)},
{
DRing
::
Account
::
ConfProperties
::
CodecInfo
::
MAX_QUALITY
,
std
::
to_string
(
systemCodecInfo
.
maxQuality
)},
{
DRing
::
Account
::
ConfProperties
::
CodecInfo
::
MIN_QUALITY
,
to_string
(
systemCodecInfo
.
minQuality
)},
{
DRing
::
Account
::
ConfProperties
::
CodecInfo
::
MIN_QUALITY
,
std
::
to_string
(
systemCodecInfo
.
minQuality
)},
{
DRing
::
Account
::
ConfProperties
::
CodecInfo
::
FRAME_RATE
,
to_string
(
frameRate
)},
{
DRing
::
Account
::
ConfProperties
::
CodecInfo
::
FRAME_RATE
,
std
::
to_string
(
frameRate
)},
{
DRing
::
Account
::
ConfProperties
::
CodecInfo
::
AUTO_QUALITY_ENABLED
,
bool_to_str
(
isAutoQualityEnabled
)}
{
DRing
::
Account
::
ConfProperties
::
CodecInfo
::
AUTO_QUALITY_ENABLED
,
bool_to_str
(
isAutoQualityEnabled
)}
};
};
}
}
...
...
src/media/media_encoder.cpp
View file @
f6dc68db
...
@@ -99,9 +99,9 @@ MediaEncoder::setOptions(const MediaStream& opts)
...
@@ -99,9 +99,9 @@ MediaEncoder::setOptions(const MediaStream& opts)
void
void
MediaEncoder
::
setOptions
(
const
MediaDescription
&
args
)
MediaEncoder
::
setOptions
(
const
MediaDescription
&
args
)
{
{
libav_utils
::
setDictValue
(
&
options_
,
"payload_type"
,
jami
::
to_string
(
args
.
payload_type
));
libav_utils
::
setDictValue
(
&
options_
,
"payload_type"
,
std
::
to_string
(
args
.
payload_type
));
libav_utils
::
setDictValue
(
&
options_
,
"max_rate"
,
jami
::
to_string
(
args
.
codec
->
bitrate
));
libav_utils
::
setDictValue
(
&
options_
,
"max_rate"
,
std
::
to_string
(
args
.
codec
->
bitrate
));
libav_utils
::
setDictValue
(
&
options_
,
"crf"
,
jami
::
to_string
(
args
.
codec
->
quality
));
libav_utils
::
setDictValue
(
&
options_
,
"crf"
,
std
::
to_string
(
args
.
codec
->
quality
));
if
(
not
args
.
parameters
.
empty
())
if
(
not
args
.
parameters
.
empty
())
libav_utils
::
setDictValue
(
&
options_
,
"parameters"
,
args
.
parameters
);
libav_utils
::
setDictValue
(
&
options_
,
"parameters"
,
args
.
parameters
);
...
...
src/media/video/video_device.h
View file @
f6dc68db
...
@@ -83,7 +83,7 @@ public:
...
@@ -83,7 +83,7 @@ public:
auto
rates
=
getRateList
(
chan
,
size
);
auto
rates
=
getRateList
(
chan
,
size
);
std
::
vector
<
std
::
string
>
rates_str
{
rates
.
size
()};
std
::
vector
<
std
::
string
>
rates_str
{
rates
.
size
()};
std
::
transform
(
rates
.
begin
(),
rates
.
end
(),
rates_str
.
begin
(),
std
::
transform
(
rates
.
begin
(),
rates
.
end
(),
rates_str
.
begin
(),
[](
FrameRate
r
)
{
return
jami
::
to_string
(
r
.
real
());
});
[](
FrameRate
r
)
{
return
std
::
to_string
(
r
.
real
());
});
cap
[
chan
][
sz
.
str
()]
=
std
::
move
(
rates_str
);
cap
[
chan
][
sz
.
str
()]
=
std
::
move
(
rates_str
);
}
}
...
@@ -124,7 +124,7 @@ public:
...
@@ -124,7 +124,7 @@ public:
std
::
stringstream
video_size
;
std
::
stringstream
video_size
;
video_size
<<
max_size
.
first
<<
"x"
<<
max_size
.
second
;
video_size
<<
max_size
.
first
<<
"x"
<<
max_size
.
second
;
settings
.
video_size
=
video_size
.
str
();
settings
.
video_size
=
video_size
.
str
();
settings
.
framerate
=
jami
::
to_string
(
max_size_rate
.
real
());
settings
.
framerate
=
std
::
to_string
(
max_size_rate
.
real
());
JAMI_WARN
(
"Default video settings: %s, %s FPS"
,
settings
.
video_size
.
c_str
(),
JAMI_WARN
(
"Default video settings: %s, %s FPS"
,
settings
.
video_size
.
c_str
(),
settings
.
framerate
.
c_str
());
settings
.
framerate
.
c_str
());
}
}
...
@@ -141,7 +141,7 @@ public:
...
@@ -141,7 +141,7 @@ public:
settings
.
name
=
params
.
name
;
settings
.
name
=
params
.
name
;
settings
.
channel
=
params
.
channel_name
;
settings
.
channel
=
params
.
channel_name
;
settings
.
video_size
=
sizeToString
(
params
.
width
,
params
.
height
);
settings
.
video_size
=
sizeToString
(
params
.
width
,
params
.
height
);
settings
.
framerate
=
jami
::
to_string
(
params
.
framerate
.
real
());
settings
.
framerate
=
std
::
to_string
(
params
.
framerate
.
real
());
return
settings
;
return
settings
;
}
}
...
...
src/media/video/video_rtp_session.cpp
View file @
f6dc68db
...
@@ -540,12 +540,12 @@ VideoRtpSession::storeVideoBitrateInfo() {
...
@@ -540,12 +540,12 @@ VideoRtpSession::storeVideoBitrateInfo() {
if
(
codecVideo
)
{
if
(
codecVideo
)
{
codecVideo
->
setCodecSpecifications
({
codecVideo
->
setCodecSpecifications
({
{
DRing
::
Account
::
ConfProperties
::
CodecInfo
::
BITRATE
,
jami
::
to_string
(
videoBitrateInfo_
.
videoBitrateCurrent
)},
{
DRing
::
Account
::
ConfProperties
::
CodecInfo
::
BITRATE
,
std
::
to_string
(
videoBitrateInfo_
.
videoBitrateCurrent
)},
{
DRing
::
Account
::
ConfProperties
::
CodecInfo
::
MIN_BITRATE
,
jami
::
to_string
(
videoBitrateInfo_
.
videoBitrateMin
)},
{
DRing
::
Account
::
ConfProperties
::
CodecInfo
::
MIN_BITRATE
,
std
::
to_string
(
videoBitrateInfo_
.
videoBitrateMin
)},
{
DRing
::
Account
::
ConfProperties
::
CodecInfo
::
MAX_BITRATE
,
jami
::
to_string
(
videoBitrateInfo_
.
videoBitrateMax
)},
{
DRing
::
Account
::
ConfProperties
::
CodecInfo
::
MAX_BITRATE
,
std
::
to_string
(
videoBitrateInfo_
.
videoBitrateMax
)},
{
DRing
::
Account
::
ConfProperties
::
CodecInfo
::
QUALITY
,
jami
::
to_string
(
videoBitrateInfo_
.
videoQualityCurrent
)},
{
DRing
::
Account
::
ConfProperties
::
CodecInfo
::
QUALITY
,
std
::
to_string
(
videoBitrateInfo_
.
videoQualityCurrent
)},
{
DRing
::
Account
::
ConfProperties
::
CodecInfo
::
MIN_QUALITY
,
jami
::
to_string
(
videoBitrateInfo_
.
videoQualityMin
)},
{
DRing
::
Account
::
ConfProperties
::
CodecInfo
::
MIN_QUALITY
,
std
::
to_string
(
videoBitrateInfo_
.
videoQualityMin
)},
{
DRing
::
Account
::
ConfProperties
::
CodecInfo
::
MAX_QUALITY
,
jami
::
to_string
(
videoBitrateInfo_
.
videoQualityMax
)}
{
DRing
::
Account
::
ConfProperties
::
CodecInfo
::
MAX_QUALITY
,
std
::
to_string
(
videoBitrateInfo_
.
videoQualityMax
)}
});
});
if
(
histoQuality_
.
size
()
>
MAX_SIZE_HISTO_QUALITY_
)
if
(
histoQuality_
.
size
()
>
MAX_SIZE_HISTO_QUALITY_
)
...
...
src/preferences.cpp
View file @
f6dc68db
...
@@ -365,7 +365,7 @@ AudioPreference::createAudioLayer()
...
@@ -365,7 +365,7 @@ AudioPreference::createAudioLayer()
if
(
audioApi_
==
JACK_API_STR
)
{
if
(
audioApi_
==
JACK_API_STR
)
{
try
{
try
{
if
(
auto
ret
=
system
(
"jack_lsp > /dev/null"
))
if
(
auto
ret
=
system
(
"jack_lsp > /dev/null"
))
throw
std
::
runtime_error
(
"Error running jack_lsp: "
+
to_string
(
ret
));
throw
std
::
runtime_error
(
"Error running jack_lsp: "
+
std
::
to_string
(
ret
));
return
new
JackLayer
(
*
this
);
return
new
JackLayer
(
*
this
);
}
catch
(
const
std
::
runtime_error
&
e
)
{
}
catch
(
const
std
::
runtime_error
&
e
)
{
JAMI_ERR
(
"%s"
,
e
.
what
());
JAMI_ERR
(
"%s"
,
e
.
what
());
...
...
src/sip/sdp.cpp
View file @
f6dc68db
...
@@ -195,7 +195,7 @@ Sdp::setMediaDescriptorLines(bool audio, bool holding, sip_utils::KeyExchangePro
...
@@ -195,7 +195,7 @@ Sdp::setMediaDescriptorLines(bool audio, bool holding, sip_utils::KeyExchangePro
enc_name
=
accountAudioCodec
->
systemCodecInfo
.
name
;
enc_name
=
accountAudioCodec
->
systemCodecInfo
.
name
;
if
(
accountAudioCodec
->
audioformat
.
nb_channels
>
1
)
{
if
(
accountAudioCodec
->
audioformat
.
nb_channels
>
1
)
{
channels
=
jami
::
to_string
(
accountAudioCodec
->
audioformat
.
nb_channels
);
channels
=
std
::
to_string
(
accountAudioCodec
->
audioformat
.
nb_channels
);
rtpmap
.
param
.
ptr
=
(
char
*
)
channels
.
c_str
();
rtpmap
.
param
.
ptr
=
(
char
*
)
channels
.
c_str
();
rtpmap
.
param
.
slen
=
strlen
(
channels
.
c_str
());
// don't include NULL terminator
rtpmap
.
param
.
slen
=
strlen
(
channels
.
c_str
());
// don't include NULL terminator
}
}
...
...
src/sip/sipaccount.cpp
View file @
f6dc68db
...
@@ -622,9 +622,9 @@ SIPAccount::getAccountDetails() const
...
@@ -622,9 +622,9 @@ SIPAccount::getAccountDetails() const
}
}
a
.
emplace
(
Conf
::
CONFIG_ACCOUNT_PASSWORD
,
std
::
move
(
password
));
a
.
emplace
(
Conf
::
CONFIG_ACCOUNT_PASSWORD
,
std
::
move
(
password
));
a
.
emplace
(
Conf
::
CONFIG_LOCAL_PORT
,
jami
::
to_string
(
localPort_
));
a
.
emplace
(
Conf
::
CONFIG_LOCAL_PORT
,
std
::
to_string
(
localPort_
));
a
.
emplace
(
Conf
::
CONFIG_ACCOUNT_ROUTESET
,
serviceRoute_
);
a
.
emplace
(
Conf
::
CONFIG_ACCOUNT_ROUTESET
,
serviceRoute_
);
a
.
emplace
(
Conf
::
CONFIG_ACCOUNT_REGISTRATION_EXPIRE
,
jami
::
to_string
(
registrationExpire_
));
a
.
emplace
(
Conf
::
CONFIG_ACCOUNT_REGISTRATION_EXPIRE
,
std
::
to_string
(
registrationExpire_
));
a
.
emplace
(
Conf
::
CONFIG_KEEP_ALIVE_ENABLED
,
keepAliveEnabled_
?
TRUE_STR
:
FALSE_STR
);
a
.
emplace
(
Conf
::
CONFIG_KEEP_ALIVE_ENABLED
,
keepAliveEnabled_
?
TRUE_STR
:
FALSE_STR
);
a
.
emplace
(
Conf
::
CONFIG_PRESENCE_ENABLED
,
presence_
and
presence_
->
isEnabled
()
?
TRUE_STR
:
FALSE_STR
);
a
.
emplace
(
Conf
::
CONFIG_PRESENCE_ENABLED
,
presence_
and
presence_
->
isEnabled
()
?
TRUE_STR
:
FALSE_STR
);
...
@@ -645,7 +645,7 @@ std::map<std::string, std::string>
...
@@ -645,7 +645,7 @@ std::map<std::string, std::string>
SIPAccount
::
getVolatileAccountDetails
()
const
SIPAccount
::
getVolatileAccountDetails
()
const
{
{
auto
a
=
SIPAccountBase
::
getVolatileAccountDetails
();
auto
a
=
SIPAccountBase
::
getVolatileAccountDetails
();
a
.
emplace
(
Conf
::
CONFIG_ACCOUNT_REGISTRATION_STATE_CODE
,
jami
::
to_string
(
registrationStateDetailed_
.
first
));
a
.
emplace
(
Conf
::
CONFIG_ACCOUNT_REGISTRATION_STATE_CODE
,
std
::
to_string
(
registrationStateDetailed_
.
first
));
a
.
emplace
(
Conf
::
CONFIG_ACCOUNT_REGISTRATION_STATE_DESC
,
registrationStateDetailed_
.
second
);
a
.
emplace
(
Conf
::
CONFIG_ACCOUNT_REGISTRATION_STATE_DESC
,
registrationStateDetailed_
.
second
);
a
.
emplace
(
DRing
::
Account
::
VolatileProperties
::
InstantMessaging
::
OFF_CALL
,
TRUE_STR
);
a
.
emplace
(
DRing
::
Account
::
VolatileProperties
::
InstantMessaging
::
OFF_CALL
,
TRUE_STR
);
...
@@ -669,7 +669,7 @@ SIPAccount::getVolatileAccountDetails() const
...
@@ -669,7 +669,7 @@ SIPAccount::getVolatileAccountDetails() const
a
.
emplace
(
name_str
.
str
(),
ca
->
toString
());
a
.
emplace
(
name_str
.
str
(),
ca
->
toString
());
ca
=
ca
->
issuer
;
ca
=
ca
->
issuer
;
}
}
a
.
emplace
(
DRing
::
TlsTransport
::
TLS_PEER_CA_NUM
,
jami
::
to_string
(
n
));
a
.
emplace
(
DRing
::
TlsTransport
::
TLS_PEER_CA_NUM
,
std
::
to_string
(
n
));
}
}
return
a
;
return
a
;
...
@@ -1665,7 +1665,7 @@ SIPAccount::getTlsSettings() const
...
@@ -1665,7 +1665,7 @@ SIPAccount::getTlsSettings() const
{
{
return
{
return
{
{
Conf
::
CONFIG_TLS_ENABLE
,
tlsEnable_
?
TRUE_STR
:
FALSE_STR
},
{
Conf
::
CONFIG_TLS_ENABLE
,
tlsEnable_
?
TRUE_STR
:
FALSE_STR
},
{
Conf
::
CONFIG_TLS_LISTENER_PORT
,
jami
::
to_string
(
tlsListenerPort_
)},
{
Conf
::
CONFIG_TLS_LISTENER_PORT
,
std
::
to_string
(
tlsListenerPort_
)},
{
Conf
::
CONFIG_TLS_CA_LIST_FILE
,
tlsCaListFile_
},
{
Conf
::
CONFIG_TLS_CA_LIST_FILE
,
tlsCaListFile_
},
{
Conf
::
CONFIG_TLS_CERTIFICATE_FILE
,
tlsCertificateFile_
},
{
Conf
::
CONFIG_TLS_CERTIFICATE_FILE
,
tlsCertificateFile_
},
{
Conf
::
CONFIG_TLS_PRIVATE_KEY_FILE
,
tlsPrivateKeyFile_
},
{
Conf
::
CONFIG_TLS_PRIVATE_KEY_FILE
,
tlsPrivateKeyFile_
},
...
...
src/sip/sipaccountbase.cpp
View file @
f6dc68db
...
@@ -138,8 +138,8 @@ addRangeToDetails(std::map<std::string, std::string> &a, const char *minKey,
...
@@ -138,8 +138,8 @@ addRangeToDetails(std::map<std::string, std::string> &a, const char *minKey,
const
char
*
maxKey
,
const
char
*
maxKey
,
const
std
::
pair
<
uint16_t
,
uint16_t
>
&
range
)
const
std
::
pair
<
uint16_t
,
uint16_t
>
&
range
)
{
{
a
.
emplace
(
minKey
,
jami
::
to_string
(
range
.
first
));
a
.
emplace
(
minKey
,
std
::
to_string
(
range
.
first
));
a
.
emplace
(
maxKey
,
jami
::
to_string
(
range
.
second
));
a
.
emplace
(
maxKey
,
std
::
to_string
(
range
.
second
));
}
}
void
SIPAccountBase
::
serialize
(
YAML
::
Emitter
&
out
)
const
void
SIPAccountBase
::
serialize
(
YAML
::
Emitter
&
out
)
const
...
@@ -265,7 +265,7 @@ SIPAccountBase::getAccountDetails() const
...
@@ -265,7 +265,7 @@ SIPAccountBase::getAccountDetails() const
a
.
emplace
(
Conf
::
CONFIG_ACCOUNT_DTMF_TYPE
,
dtmfType_
);
a
.
emplace
(
Conf
::
CONFIG_ACCOUNT_DTMF_TYPE
,
dtmfType_
);
a
.
emplace
(
Conf
::
CONFIG_LOCAL_INTERFACE
,
interface_
);
a
.
emplace
(
Conf
::
CONFIG_LOCAL_INTERFACE
,
interface_
);
a
.
emplace
(
Conf
::
CONFIG_PUBLISHED_PORT
,
jami
::
to_string
(
publishedPort_
));
a
.
emplace
(
Conf
::
CONFIG_PUBLISHED_PORT
,
std
::
to_string
(
publishedPort_
));
a
.
emplace
(
Conf
::
CONFIG_PUBLISHED_SAMEAS_LOCAL
,
publishedSameasLocal_
?
TRUE_STR
:
FALSE_STR
);
a
.
emplace
(
Conf
::
CONFIG_PUBLISHED_SAMEAS_LOCAL
,
publishedSameasLocal_
?
TRUE_STR
:
FALSE_STR
);
a
.
emplace
(
Conf
::
CONFIG_PUBLISHED_ADDRESS
,
publishedIpAddress_
);
a
.
emplace
(
Conf
::
CONFIG_PUBLISHED_ADDRESS
,
publishedIpAddress_
);
...
@@ -289,7 +289,7 @@ SIPAccountBase::getVolatileAccountDetails() const
...
@@ -289,7 +289,7 @@ SIPAccountBase::getVolatileAccountDetails() const
if
(
isIP2IP
())
if
(
isIP2IP
())
a
[
Conf
::
CONFIG_ACCOUNT_REGISTRATION_STATUS
]
=
"READY"
;
a
[
Conf
::
CONFIG_ACCOUNT_REGISTRATION_STATUS
]
=
"READY"
;
a
.
emplace
(
Conf
::
CONFIG_TRANSPORT_STATE_CODE
,
jami
::
to_string
(
transportStatus_
));
a
.
emplace
(
Conf
::
CONFIG_TRANSPORT_STATE_CODE
,
std
::
to_string
(
transportStatus_
));
a
.
emplace
(
Conf
::
CONFIG_TRANSPORT_STATE_DESC
,
transportError_
);
a
.
emplace
(
Conf
::
CONFIG_TRANSPORT_STATE_DESC
,
transportError_
);
return
a
;
return
a
;
}
}
...
...
src/sip/sipcall.cpp
View file @
f6dc68db
...
@@ -1231,7 +1231,7 @@ SIPCall::getDetails() const
...
@@ -1231,7 +1231,7 @@ SIPCall::getDetails() const
ca
=
ca
->
issuer
;
ca
=
ca
->
issuer
;
}
}
details
.
emplace
(
DRing
::
TlsTransport
::
TLS_PEER_CA_NUM
,
details
.
emplace
(
DRing
::
TlsTransport
::
TLS_PEER_CA_NUM
,
jami
::
to_string
(
n
));
std
::
to_string
(
n
));
}
else
{
}
else
{
details
.
emplace
(
DRing
::
TlsTransport
::
TLS_PEER_CERT
,
""
);
details
.
emplace
(
DRing
::
TlsTransport
::
TLS_PEER_CERT
,
""
);
details
.
emplace
(
DRing
::
TlsTransport
::
TLS_PEER_CA_NUM
,
""
);
details
.
emplace
(
DRing
::
TlsTransport
::
TLS_PEER_CA_NUM
,
""
);
...
...
src/sip/sipvoiplink.cpp
View file @
f6dc68db
...
@@ -1187,7 +1187,7 @@ SIPVoIPLink::resolveSrvName(const std::string &name, pjsip_transport_type_e type
...
@@ -1187,7 +1187,7 @@ SIPVoIPLink::resolveSrvName(const std::string &name, pjsip_transport_type_e type
/*.addr = */
{{(
char
*
)
name
.
c_str
(),
name_size
},
port
},
/*.addr = */
{{(
char
*
)
name
.
c_str
(),
name_size
},
port
},
};
};
const
auto
token
=
std
::
hash
<
std
::
string
>
()(
name
+
to_string
(
type
));
const
auto
token
=
std
::
hash
<
std
::
string
>
()(
name
+
std
::
to_string
(
type
));
getResolveCallbackMap
().
registerCallback
(
token
,
getResolveCallbackMap
().
registerCallback
(
token
,
[
=
,
cb
=
std
::
move
(
cb
)](
pj_status_t
s
,
const
pjsip_server_addresses
*
r
)
{
[
=
,
cb
=
std
::
move
(
cb
)](
pj_status_t
s
,
const
pjsip_server_addresses
*
r
)
{
try
{
try
{
...
...
src/smartools.cpp
View file @
f6dc68db
...
@@ -97,11 +97,11 @@ Smartools::setResolution(const std::string& id, int width, int height)
...
@@ -97,11 +97,11 @@ Smartools::setResolution(const std::string& id, int width, int height)
{
{
std
::
lock_guard
<
std
::
mutex
>
lk
(
mutexInfo_
);
std
::
lock_guard
<
std
::
mutex
>
lk
(
mutexInfo_
);
if
(
id
==
"local"
){
if
(
id
==
"local"
){
information_
[
"local width"
]
=
to_string
(
width
);
information_
[
"local width"
]
=
std
::
to_string
(
width
);
information_
[
"local height"
]
=
to_string
(
height
);
information_
[
"local height"
]
=
std
::
to_string
(
height
);
}
else
{
}
else
{
information_
[
"remote width"
]
=
to_string
(
width
);
information_
[
"remote width"
]
=
std
::
to_string
(
width
);
information_
[
"remote height"
]
=
to_string
(
height
);
information_
[
"remote height"
]
=
std
::
to_string
(
height
);
}
}
}
}
...
...
src/string_utils.h
View file @
f6dc68db
...
@@ -39,21 +39,12 @@ bool_to_str(bool b) noexcept
...
@@ -39,21 +39,12 @@ bool_to_str(bool b) noexcept
return
b
?
TRUE_STR
:
FALSE_STR
;
return
b
?
TRUE_STR
:
FALSE_STR
;
}
}
std
::
string
to_string
(
double
value
);
#ifdef _WIN32
#ifdef _WIN32
std
::
wstring
to_wstring
(
const
std
::
string
&
s
);
std
::
wstring
to_wstring
(
const
std
::
string
&
s
);
std
::
string
decodeMultibyteString
(
const
std
::
string
&
s
);
std
::
string
decodeMultibyteString
(
const
std
::
string
&
s
);
std
::
string
bstrToStdString
(
BSTR
bstr
);
std
::
string
bstrToStdString
(
BSTR
bstr
);
#endif
#endif
template
<
typename
T
>
inline
std
::
string
to_string
(
T
&&
value
)
{
return
std
::
to_string
(
std
::
forward
<
T
>
(
value
));
}
static
inline
int
static
inline
int
stoi
(
const
std
::
string
&
str
)
stoi
(
const
std
::
string
&
str
)
{
{
...
...
src/upnp/upnp_context.cpp
View file @
f6dc68db
...
@@ -1184,7 +1184,7 @@ UPnPContext::removeMappingsByLocalIPAndDescription(const UPnPIGD& igd, const std
...
@@ -1184,7 +1184,7 @@ UPnPContext::removeMappingsByLocalIPAndDescription(const UPnPIGD& igd, const std
std
::
unique_ptr
<
IXML_Document
,
decltype
(
ixmlDocument_free
)
&>
action
(
nullptr
,
ixmlDocument_free
);
std
::
unique_ptr
<
IXML_Document
,
decltype
(
ixmlDocument_free
)
&>
action
(
nullptr
,
ixmlDocument_free
);
IXML_Document
*
action_ptr
=
nullptr
;
IXML_Document
*
action_ptr
=
nullptr
;
UpnpAddToAction
(
&
action_ptr
,
"GetGenericPortMappingEntry"
,
igd
.
getServiceType
().
c_str
(),
UpnpAddToAction
(
&
action_ptr
,
"GetGenericPortMappingEntry"
,
igd
.
getServiceType
().
c_str
(),
"NewPortMappingIndex"
,
jami
::
to_string
(
entry_idx
).
c_str
());
"NewPortMappingIndex"
,
std
::
to_string
(
entry_idx
).
c_str
());
action
.
reset
(
action_ptr
);
action
.
reset
(
action_ptr
);
std
::
unique_ptr
<
IXML_Document
,
decltype
(
ixmlDocument_free
)
&>
response
(
nullptr
,
ixmlDocument_free
);
std
::
unique_ptr
<
IXML_Document
,
decltype
(
ixmlDocument_free
)
&>
response
(
nullptr
,
ixmlDocument_free
);
...
...
src/upnp/upnp_igd.h
View file @
f6dc68db
...
@@ -68,9 +68,9 @@ public:
...
@@ -68,9 +68,9 @@ public:
friend
bool
operator
!=
(
const
Mapping
&
cRedir1
,
const
Mapping
&
cRedir2
);
friend
bool
operator
!=
(
const
Mapping
&
cRedir1
,
const
Mapping
&
cRedir2
);
uint16_t
getPortExternal
()
const
{
return
port_external_
;
}
uint16_t
getPortExternal
()
const
{
return
port_external_
;
}
std
::
string
getPortExternalStr
()
const
{
return
jami
::
to_string
(
port_external_
);
}
std
::
string
getPortExternalStr
()
const
{
return
std
::
to_string
(
port_external_
);
}
uint16_t
getPortInternal
()
const
{
return
port_internal_
;
}
uint16_t
getPortInternal
()
const
{
return
port_internal_
;
}
std
::
string
getPortInternalStr
()
const
{
return
jami
::
to_string
(
port_internal_
);
}
std
::
string
getPortInternalStr
()
const
{
return
std
::
to_string
(
port_internal_
);
}
PortType
getType
()
const
{
return
type_
;
}
PortType
getType
()
const
{
return
type_
;
}
std
::
string
getTypeStr
()
const
{
return
type_
==
PortType
::
UDP
?
"UDP"
:
"TCP"
;
}
std
::
string
getTypeStr
()
const
{
return
type_
==
PortType
::
UDP
?
"UDP"
:
"TCP"
;
}
std
::
string
getDescription
()
const
{
return
description_
;
}
std
::
string
getDescription
()
const
{
return
description_
;
}
...
...
Write
Preview
Supports
Markdown
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