Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
savoirfairelinux
jami-daemon
Commits
8cc2cb0f
Commit
8cc2cb0f
authored
Jan 25, 2012
by
Tristan Matthews
Browse files
* #8357: daemon builds after ./configure --disable-video
parent
90fe5e2d
Changes
26
Hide whitespace changes
Inline
Side-by-side
daemon/src/account.cpp
View file @
8cc2cb0f
...
...
@@ -32,9 +32,11 @@
#include
"account.h"
#include
"manager.h"
#ifdef SFL_VIDEO
#include
"video/video_endpoint.h"
#endif
Account
::
Account
(
const
std
::
string
&
accountID
,
const
std
::
string
&
type
)
:
Account
::
Account
(
const
std
::
string
&
accountID
,
const
std
::
string
&
type
)
:
accountID_
(
accountID
)
,
username_
()
,
hostname_
()
...
...
@@ -43,8 +45,10 @@ Account::Account (const std::string& accountID, const std::string &type) :
,
enabled_
(
true
)
,
type_
(
type
)
,
registrationState_
(
Unregistered
)
,
codecOrder_
()
,
videoCodecOrder_
()
,
codecList_
()
#ifdef SFL_VIDEO
,
videoCodecList_
()
#endif
,
codecStr_
()
,
ringtonePath_
(
"/usr/share/sflphone/ringtones/konga.ul"
)
,
ringtoneEnabled_
(
true
)
...
...
@@ -52,13 +56,12 @@ Account::Account (const std::string& accountID, const std::string &type) :
,
userAgent_
(
"SFLphone"
)
,
mailBox_
()
{
// Initialize the codec
order
, used when creating a new account
// Initialize the codec
list
, used when creating a new account
loadDefaultCodecs
();
}
Account
::~
Account
()
{
}
{}
void
Account
::
setRegistrationState
(
const
RegistrationState
&
state
)
{
...
...
@@ -73,7 +76,7 @@ void Account::setRegistrationState(const RegistrationState &state)
void
Account
::
loadDefaultCodecs
()
{
// Initialize codec
std
::
vector
<
std
::
string
>
codecList
;
std
::
vector
<
std
::
string
>
codecList
;
codecList
.
push_back
(
"0"
);
codecList
.
push_back
(
"3"
);
codecList
.
push_back
(
"8"
);
...
...
@@ -83,25 +86,29 @@ void Account::loadDefaultCodecs()
codecList
.
push_back
(
"112"
);
setActiveCodecs
(
codecList
);
#if SFL_VIDEO
setActiveVideoCodecs
(
sfl_video
::
getVideoCodecList
());
#endif
}
#if SFL_VIDEO
void
Account
::
setActiveVideoCodecs
(
const
std
::
vector
<
std
::
string
>
&
list
)
{
videoCodec
Order
_
=
!
list
.
empty
()
?
list
:
sfl_video
::
getVideoCodecList
();
videoCodec
List
_
=
!
list
.
empty
()
?
list
:
sfl_video
::
getVideoCodecList
();
}
#endif
void
Account
::
setActiveCodecs
(
const
std
::
vector
<
std
::
string
>
&
list
)
{
// first clear the previously stored codecs
codec
Order
_
.
clear
();
codec
List
_
.
clear
();
// list contains the ordered payload of active codecs picked by the user for this account
// we used the Codec
Order
vector to save the order.
// we used the Codec
List
vector to save the order.
for
(
std
::
vector
<
std
::
string
>::
const_iterator
iter
=
list
.
begin
();
iter
!=
list
.
end
();
++
iter
)
{
int
payload
=
std
::
atoi
(
iter
->
c_str
());
codec
Order
_
.
push_back
(
(
int
)
payload
);
codec
List
_
.
push_back
(
static_cast
<
int
>
(
payload
)
)
;
}
// update the codec string according to new codec selection
...
...
daemon/src/account.h
View file @
8cc2cb0f
...
...
@@ -140,7 +140,9 @@ static const char * const accountEnableKey = "enable";
static
const
char
*
const
mailboxKey
=
"mailbox"
;
static
const
char
*
const
codecsKey
=
"codecs"
;
// 0/9/110/111/112/
#ifdef SFL_VIDEO
static
const
char
*
const
videocodecsKey
=
"videocodecs"
;
#endif
static
const
char
*
const
ringtonePathKey
=
"ringtonePath"
;
static
const
char
*
const
ringtoneEnabledKey
=
"ringtoneEnabled"
;
static
const
char
*
const
displayNameKey
=
"displayName"
;
...
...
@@ -250,20 +252,22 @@ class Account : public Serializable {
type_
=
type
;
}
#ifdef SFL_VIDEO
/**
* Accessor to data structures
* @return std::vector<std::string>& The list that reflects the user's choice
*/
const
std
::
vector
<
std
::
string
>
&
getActiveVideoCodecs
(
void
)
const
{
return
videoCodec
Order
_
;
std
::
vector
<
std
::
string
>
getActiveVideoCodecs
(
)
const
{
return
videoCodec
List
_
;
}
#endif
/**
* Accessor to data structures
* @return CodecOrder& The list that reflects the user's choice
*/
const
CodecOrder
&
getActiveCodecs
()
const
{
return
codec
Order
_
;
std
::
vector
<
int
>
getActiveCodecs
()
const
{
return
codec
List
_
;
}
/**
...
...
@@ -271,7 +275,9 @@ class Account : public Serializable {
* SDP offer and configuration respectively
*/
void
setActiveCodecs
(
const
std
::
vector
<
std
::
string
>&
list
);
#ifdef SFL_VIDEO
void
setActiveVideoCodecs
(
const
std
::
vector
<
std
::
string
>&
list
);
#endif
std
::
string
getRingtonePath
()
const
{
return
ringtonePath_
;
...
...
@@ -361,12 +367,14 @@ class Account : public Serializable {
/**
* Vector containing the order of the codecs
*/
CodecOrder
codec
Order
_
;
std
::
vector
<
int
>
codec
List
_
;
#ifdef SFL_VIDEO
/**
* Vector containing the order of the video codecs
*/
std
::
vector
<
std
::
string
>
videoCodecOrder_
;
std
::
vector
<
std
::
string
>
videoCodecList_
;
#endif
/**
* List of codec obtained when parsing configuration and used
...
...
daemon/src/audio/codecs/audiocodecfactory.cpp
View file @
8cc2cb0f
...
...
@@ -38,7 +38,7 @@
#include
"fileutils.h"
AudioCodecFactory
::
AudioCodecFactory
()
:
codecsMap_
(),
defaultCodec
Order
_
(),
libCache_
(),
codecInMemory_
()
codecsMap_
(),
defaultCodec
List
_
(),
libCache_
(),
codecInMemory_
()
{
typedef
std
::
vector
<
sfl
::
Codec
*>
CodecVector
;
CodecVector
codecDynamicList
(
scanCodecDirectory
());
...
...
@@ -46,21 +46,19 @@ AudioCodecFactory::AudioCodecFactory() :
if
(
codecDynamicList
.
empty
())
ERROR
(
"Error - No codecs available"
);
else
{
for
(
CodecVector
::
const_iterator
i
ter
=
codecDynamicList
.
begin
();
iter
!=
codecDynamicList
.
end
()
;
++
i
ter
)
{
codecsMap_
[(
int
)(
*
i
ter
)
->
getPayloadType
()]
=
*
i
ter
;
DEBUG
(
"Loaded codec %s"
,
(
*
i
ter
)
->
getMimeSubtype
().
c_str
());
for
(
CodecVector
::
const_iterator
i
=
codecDynamicList
.
begin
();
i
!=
codecDynamicList
.
end
()
;
++
i
)
{
codecsMap_
[(
int
)(
*
i
)
->
getPayloadType
()]
=
*
i
;
DEBUG
(
"Loaded codec %s"
,
(
*
i
)
->
getMimeSubtype
().
c_str
());
}
}
}
void
AudioCodecFactory
::
setDefaultOrder
()
{
defaultCodecOrder_
.
clear
();
CodecsMap
::
const_iterator
iter
;
for
(
iter
=
codecsMap_
.
begin
();
iter
!=
codecsMap_
.
end
();
++
iter
)
defaultCodecOrder_
.
push_back
(
iter
->
first
);
defaultCodecList_
.
clear
();
for
(
CodecsMap
::
const_iterator
i
=
codecsMap_
.
begin
();
i
!=
codecsMap_
.
end
();
++
i
)
defaultCodecList_
.
push_back
(
i
->
first
);
}
std
::
string
...
...
@@ -78,11 +76,11 @@ std::vector<int32_t >
AudioCodecFactory
::
getAudioCodecList
()
const
{
std
::
vector
<
int32_t
>
list
;
int
size
=
codecsMap_
.
size
();
printf
(
"%d
\n
"
,
size
);
for
(
CodecsMap
::
const_iterator
i
ter
=
codecsMap_
.
begin
();
i
ter
!=
codecsMap_
.
end
();
++
i
ter
)
if
(
i
ter
->
second
)
list
.
push_back
((
int32_t
)
i
ter
->
first
);
int
size
=
codecsMap_
.
size
();
printf
(
"%d
\n
"
,
size
);
for
(
CodecsMap
::
const_iterator
i
=
codecsMap_
.
begin
();
i
!=
codecsMap_
.
end
();
++
i
)
if
(
i
->
second
)
list
.
push_back
((
int32_t
)
i
->
first
);
return
list
;
}
...
...
@@ -121,24 +119,24 @@ int AudioCodecFactory::getSampleRate(int payload) const
void
AudioCodecFactory
::
saveActiveCodecs
(
const
std
::
vector
<
std
::
string
>&
list
)
{
defaultCodec
Order
_
.
clear
();
defaultCodec
List
_
.
clear
();
// list contains the ordered payload of active codecs picked by the user
// we used the Codec
Order
vector to save the order.
// we used the Codec
List
vector to save the order.
for
(
std
::
vector
<
std
::
string
>::
const_iterator
iter
=
list
.
begin
();
iter
!=
list
.
end
();
++
iter
)
{
int
payload
=
std
::
atoi
(
iter
->
c_str
());
if
(
isCodecLoaded
(
payload
))
defaultCodec
Order
_
.
push_back
(
(
int
)
payload
);
defaultCodec
List
_
.
push_back
(
static_cast
<
int
>
(
payload
)
)
;
}
}
AudioCodecFactory
::~
AudioCodecFactory
()
{
for
(
std
::
vector
<
CodecHandlePointer
>::
const_iterator
i
ter
=
codecInMemory_
.
begin
();
i
ter
!=
codecInMemory_
.
end
();
++
i
ter
)
unloadCodec
(
*
i
ter
);
for
(
std
::
vector
<
CodecHandlePointer
>::
const_iterator
i
=
codecInMemory_
.
begin
();
i
!=
codecInMemory_
.
end
();
++
i
)
unloadCodec
(
*
i
);
}
std
::
vector
<
sfl
::
Codec
*>
AudioCodecFactory
::
scanCodecDirectory
()
...
...
@@ -236,11 +234,9 @@ void AudioCodecFactory::unloadCodec(CodecHandlePointer p)
sfl
::
Codec
*
AudioCodecFactory
::
instantiateCodec
(
int
payload
)
const
{
std
::
vector
<
CodecHandlePointer
>::
const_iterator
iter
;
for
(
iter
=
codecInMemory_
.
begin
();
iter
!=
codecInMemory_
.
end
();
++
iter
)
{
if
(
iter
->
first
->
getPayloadType
()
==
payload
)
{
create_t
*
createCodec
=
(
create_t
*
)
dlsym
(
iter
->
second
,
CODEC_ENTRY_SYMBOL
);
for
(
std
::
vector
<
CodecHandlePointer
>::
const_iterator
i
=
codecInMemory_
.
begin
();
i
!=
codecInMemory_
.
end
();
++
i
)
{
if
(
i
->
first
->
getPayloadType
()
==
payload
)
{
create_t
*
createCodec
=
(
create_t
*
)
dlsym
(
i
->
second
,
CODEC_ENTRY_SYMBOL
);
char
*
error
=
dlerror
();
...
...
@@ -309,10 +305,8 @@ AudioCodecFactory::alreadyInCache(const std::string &lib)
bool
AudioCodecFactory
::
isCodecLoaded
(
int
payload
)
const
{
CodecsMap
::
const_iterator
iter
;
for
(
iter
=
codecsMap_
.
begin
();
iter
!=
codecsMap_
.
end
();
++
iter
)
if
(
iter
->
first
==
payload
)
for
(
CodecsMap
::
const_iterator
i
=
codecsMap_
.
begin
();
i
!=
codecsMap_
.
end
();
++
i
)
if
(
i
->
first
==
payload
)
return
true
;
return
false
;
...
...
daemon/src/audio/codecs/audiocodecfactory.h
View file @
8cc2cb0f
...
...
@@ -168,7 +168,7 @@ class AudioCodecFactory {
/**
* Vector containing a default order for the codecs
*/
CodecOrder
defaultCodec
Order
_
;
std
::
vector
<
int
>
defaultCodec
List
_
;
/**
* Vector containing the complete name of the codec shared library scanned
...
...
daemon/src/config/yamlemitter.cpp
View file @
8cc2cb0f
...
...
@@ -239,7 +239,7 @@ void YamlEmitter::serializeAudioPreference(MappingNode *map)
addMappingItem
(
preferencemapping
,
iter
->
first
,
iter
->
second
);
}
#ifdef SFL_VIDEO
void
YamlEmitter
::
serializeVideoPreference
(
MappingNode
*
map
)
{
if
(
map
->
getType
()
!=
MAPPING
)
...
...
@@ -262,6 +262,7 @@ void YamlEmitter::serializeVideoPreference(MappingNode *map)
for
(
Mapping
::
iterator
iter
=
internalmap
->
begin
();
iter
!=
internalmap
->
end
();
++
iter
)
addMappingItem
(
preferencemapping
,
iter
->
first
,
iter
->
second
);
}
#endif
void
YamlEmitter
::
serializeShortcutPreference
(
MappingNode
*
map
)
...
...
daemon/src/config/yamlemitter.h
View file @
8cc2cb0f
...
...
@@ -71,8 +71,9 @@ class YamlEmitter {
void
serializeAudioPreference
(
MappingNode
*
map
);
#ifdef SFL_VIDEO
void
serializeVideoPreference
(
MappingNode
*
map
);
#endif
void
serializeShortcutPreference
(
MappingNode
*
map
);
void
writeAudio
();
...
...
daemon/src/config/yamlparser.cpp
View file @
8cc2cb0f
...
...
@@ -48,7 +48,9 @@ YamlParser::YamlParser(const char *file) : filename_(file)
,
preferenceNode_
(
NULL
)
,
addressbookNode_
(
NULL
)
,
audioNode_
(
NULL
)
#ifdef SFL_VIDEO
,
videoNode_
(
NULL
)
#endif
,
hooksNode_
(
NULL
)
,
voiplinkNode_
(
NULL
)
,
shortcutNode_
(
NULL
)
...
...
@@ -397,7 +399,9 @@ void YamlParser::mainNativeDataMapping(MappingNode *map)
accountSequence_
=
(
SequenceNode
*
)(
*
mapping
)[
"accounts"
];
addressbookNode_
=
(
MappingNode
*
)(
*
mapping
)[
"addressbook"
];
audioNode_
=
(
MappingNode
*
)(
*
mapping
)[
"audio"
];
#ifdef SFL_VIDEO
videoNode_
=
(
MappingNode
*
)(
*
mapping
)[
"video"
];
#endif
hooksNode_
=
(
MappingNode
*
)(
*
mapping
)[
"hooks"
];
preferenceNode_
=
(
MappingNode
*
)(
*
mapping
)[
"preferences"
];
voiplinkNode_
=
(
MappingNode
*
)(
*
mapping
)[
"voipPreferences"
];
...
...
daemon/src/config/yamlparser.h
View file @
8cc2cb0f
...
...
@@ -82,9 +82,11 @@ class YamlParser {
return
audioNode_
;
}
#ifdef SFL_VIDEO
MappingNode
*
getVideoNode
()
{
return
videoNode_
;
}
#endif
MappingNode
*
getHookNode
()
{
return
hooksNode_
;
...
...
@@ -151,7 +153,9 @@ class YamlParser {
MappingNode
*
preferenceNode_
;
MappingNode
*
addressbookNode_
;
MappingNode
*
audioNode_
;
#ifdef SFL_VIDEO
MappingNode
*
videoNode_
;
#endif
MappingNode
*
hooksNode_
;
MappingNode
*
voiplinkNode_
;
MappingNode
*
shortcutNode_
;
...
...
daemon/src/global.h
View file @
8cc2cb0f
...
...
@@ -118,9 +118,6 @@ enum {
PAYLOAD_CODEC_SPEEX_32000
=
112
};
/** The struct to reflect the order the user wants to use the codecs */
typedef
std
::
vector
<
int
>
CodecOrder
;
#define IP2IP_PROFILE "IP2IP"
#define DIR_SEPARATOR_STR "/" // Directory separator char
#define DIR_SEPARATOR_CH = '/'
/** Directory separator string */
...
...
daemon/src/iax/iaxcall.cpp
View file @
8cc2cb0f
...
...
@@ -62,15 +62,16 @@ IAXCall::IAXCall(const std::string& id, Call::CallType type) : Call(id, type),
int
IAXCall
::
getSupportedFormat
(
const
std
::
string
&
accountID
)
const
{
using
std
::
vector
;
Account
*
account
=
Manager
::
instance
().
getAccount
(
accountID
);
int
format_mask
=
0
;
if
(
account
)
{
CodecOrder
map
(
account
->
getActiveCodecs
());
vector
<
int
>
codecs
(
account
->
getActiveCodecs
());
for
(
CodecOrder
::
const_iterator
i
ter
=
map
.
begin
();
i
ter
!=
map
.
end
();
++
i
ter
)
format_mask
|=
codecToASTFormat
(
*
i
ter
);
for
(
vector
<
int
>
::
const_iterator
i
=
codecs
.
begin
();
i
!=
codecs
.
end
();
++
i
)
format_mask
|=
codecToASTFormat
(
*
i
);
}
else
ERROR
(
"No IAx account could be found"
);
...
...
@@ -79,13 +80,14 @@ int IAXCall::getSupportedFormat(const std::string &accountID) const
int
IAXCall
::
getFirstMatchingFormat
(
int
needles
,
const
std
::
string
&
accountID
)
const
{
using
std
::
vector
;
Account
*
account
=
Manager
::
instance
().
getAccount
(
accountID
);
if
(
account
!=
NULL
)
{
CodecOrder
map
(
account
->
getActiveCodecs
());
vector
<
int
>
codecs
(
account
->
getActiveCodecs
());
for
(
CodecOrder
::
const_iterator
i
ter
=
map
.
begin
();
i
ter
!=
map
.
end
();
++
i
ter
)
{
int
format_mask
=
codecToASTFormat
(
*
i
ter
);
for
(
vector
<
int
>
::
const_iterator
i
=
codecs
.
begin
();
i
!=
codecs
.
end
();
++
i
)
{
int
format_mask
=
codecToASTFormat
(
*
i
);
// Return the first that matches
if
(
format_mask
&
needles
)
...
...
daemon/src/iax/iaxvoiplink.cpp
View file @
8cc2cb0f
...
...
@@ -410,11 +410,13 @@ IAXVoIPLink::sendTextMessage(sfl::InstantMessaging *module,
}
}
#ifdef SFL_VIDEO
std
::
string
IAXVoIPLink
::
getCurrentVideoCodecName
(
const
std
::
string
&
/*id*/
)
{
return
""
;
}
#endif
std
::
string
IAXVoIPLink
::
getCurrentCodecName
(
Call
*
c
)
const
...
...
daemon/src/iax/iaxvoiplink.h
View file @
8cc2cb0f
...
...
@@ -173,7 +173,9 @@ class IAXVoIPLink : public VoIPLink {
* Return the codec protocol used for this call
* @param id The call identifier
*/
#ifdef SFL_VIDEO
virtual
std
::
string
getCurrentVideoCodecName
(
const
std
::
string
&
id
);
#endif
virtual
std
::
string
getCurrentCodecName
(
Call
*
c
)
const
;
private:
...
...
daemon/src/preferences.cpp
View file @
8cc2cb0f
...
...
@@ -408,69 +408,6 @@ void AudioPreference::unserialize(Conf::MappingNode *map)
}
}
VideoPreference
::
VideoPreference
()
:
v4l2_list_
(
0
),
device_
(),
channel_
(),
size_
(),
rate_
()
{
v4l2_list_
=
new
VideoV4l2ListThread
();
v4l2_list_
->
start
();
}
VideoPreference
::~
VideoPreference
()
{
delete
v4l2_list_
;
}
std
::
map
<
std
::
string
,
std
::
string
>
VideoPreference
::
getVideoSettings
()
{
std
::
map
<
std
::
string
,
std
::
string
>
map
;
std
::
stringstream
ss
;
map
[
"input"
]
=
v4l2_list_
->
getDeviceNode
(
device_
);
ss
<<
v4l2_list_
->
getChannelNum
(
device_
,
channel_
);
map
[
"channel"
]
=
ss
.
str
();
map
[
"video_size"
]
=
size_
;
size_t
x_pos
=
size_
.
find
(
"x"
);
map
[
"width"
]
=
size_
.
substr
(
0
,
x_pos
);
map
[
"height"
]
=
size_
.
substr
(
x_pos
+
1
);
map
[
"framerate"
]
=
rate_
;
return
map
;
}
void
VideoPreference
::
serialize
(
Conf
::
YamlEmitter
*
emitter
)
{
if
(
emitter
==
NULL
)
{
ERROR
(
"VideoPreference: Error: emitter is NULL while serializing"
);
return
;
}
Conf
::
MappingNode
preferencemap
(
NULL
);
Conf
::
ScalarNode
device
(
device_
);
Conf
::
ScalarNode
channel
(
channel_
);
Conf
::
ScalarNode
size
(
size_
);
Conf
::
ScalarNode
rate
(
rate_
);
preferencemap
.
setKeyValue
(
videoDeviceKey
,
&
device
);
preferencemap
.
setKeyValue
(
videoChannelKey
,
&
channel
);
preferencemap
.
setKeyValue
(
videoSizeKey
,
&
size
);
preferencemap
.
setKeyValue
(
videoRateKey
,
&
rate
);
emitter
->
serializeVideoPreference
(
&
preferencemap
);
}
void
VideoPreference
::
unserialize
(
Conf
::
MappingNode
*
map
)
{
if
(
map
==
NULL
)
{
ERROR
(
"VideoPreference: Error: Preference map is NULL"
);
return
;
}
map
->
getValue
(
videoDeviceKey
,
&
device_
);
map
->
getValue
(
videoChannelKey
,
&
channel_
);
map
->
getValue
(
videoSizeKey
,
&
size_
);
map
->
getValue
(
videoRateKey
,
&
rate_
);
}
ShortcutPreferences
::
ShortcutPreferences
()
:
hangup_
(),
pickup_
(),
popup_
(),
toggleHold_
(),
togglePickupHangup_
()
{}
...
...
@@ -487,7 +424,6 @@ std::map<std::string, std::string> ShortcutPreferences::getShortcuts() const
return
shortcutsMap
;
}
void
ShortcutPreferences
::
setShortcuts
(
std
::
map
<
std
::
string
,
std
::
string
>
map
)
{
hangup_
=
map
[
hangupShortKey
];
...
...
@@ -497,7 +433,6 @@ void ShortcutPreferences::setShortcuts(std::map<std::string, std::string> map)
togglePickupHangup_
=
map
[
togglePickupHangupShortKey
];
}
void
ShortcutPreferences
::
serialize
(
Conf
::
YamlEmitter
*
emitter
)
{
Conf
::
MappingNode
preferencemap
(
NULL
);
...
...
daemon/src/preferences.h
View file @
8cc2cb0f
...
...
@@ -32,9 +32,6 @@
#define __PREFERENCE_H__
#include
"config/serializable.h"
#include
"video/video_v4l2_list.h"
#include
"video/video_v4l2.h"
using
namespace
sfl_video
;
// general preferences
static
const
char
*
const
orderKey
=
"order"
;
...
...
@@ -93,12 +90,6 @@ static const char * const echoCancelKey = "echoCancel";
static
const
char
*
const
echoTailKey
=
"echoTailLength"
;
static
const
char
*
const
echoDelayKey
=
"echoDelayLength"
;
// video preferences
const
std
::
string
videoDeviceKey
(
"v4l2Dev"
);
const
std
::
string
videoChannelKey
(
"v4l2Channel"
);
const
std
::
string
videoSizeKey
(
"v4l2Size"
);
const
std
::
string
videoRateKey
(
"v4l2Rate"
);
// shortcut preferences
static
const
char
*
const
hangupShortKey
=
"hangUp"
;
static
const
char
*
const
pickupShortKey
=
"pickUp"
;
...
...
@@ -573,80 +564,6 @@ class AudioPreference : public Serializable {
int
echoCancelDelay_
;
};
class
VideoPreference
:
public
Serializable
{
public:
VideoPreference
();
~
VideoPreference
();
virtual
void
serialize
(
Conf
::
YamlEmitter
*
emitter
);
virtual
void
unserialize
(
Conf
::
MappingNode
*
map
);
std
::
map
<
std
::
string
,
std
::
string
>
getVideoSettings
();
std
::
string
getDevice
()
const
{
return
device_
;
}
void
setDevice
(
const
std
::
string
&
device
)
{
device_
=
device
;
}
std
::
string
getChannel
()
const
{
return
channel_
;
}
void
setChannel
(
const
std
::
string
&
input
)
{
channel_
=
input
;
}
std
::
string
getSize
()
const
{
return
size_
;
}
void
setSize
(
const
std
::
string
&
size
)
{
size_
=
size
;
}
const
std
::
string
&
getRate
()
const
{
return
rate_
;
}
void
setRate
(
const
std
::
string
&
rate
)
{
rate_
=
rate
;
}
std
::
vector
<
std
::
string
>
getDeviceList
()
const
{
return
v4l2_list_
->
getDeviceList
();
}
std
::
vector
<
std
::
string
>
getChannelList
(
const
std
::
string
&
dev
)
const
{
return
v4l2_list_
->
getChannelList
(
dev
);
}
std
::
vector
<
std
::
string
>
getSizeList
(
const
std
::
string
&
dev
,
const
std
::
string
&
channel
)
const
{
return
v4l2_list_
->
getSizeList
(
dev
,
channel
);
}
std
::
vector
<
std
::
string
>
getRateList
(
const
std
::
string
&
dev
,
const
std
::
string
&
channel
,
const
std
::
string
&
size
)
const
{
return
v4l2_list_
->
getRateList
(
dev
,
channel
,
size
);
}
private:
NON_COPYABLE
(
VideoPreference
);
// V4L2 devices
sfl_video
::
VideoV4l2ListThread
*
v4l2_list_
;
std
::
string
device_
;
std
::
string
channel_
;
std
::
string
size_
;
std
::
string
rate_
;
};
class
ShortcutPreferences
:
public
Serializable
{
public:
ShortcutPreferences
();
...
...
daemon/src/sip/sdp.cpp
View file @
8cc2cb0f
...
...
@@ -30,6 +30,10 @@
* as that of the covered work.
*/