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
d792b6b0
Commit
d792b6b0
authored
Feb 07, 2008
by
Emmanuel Milou
Browse files
Retrieve the user config for codecs order
parent
de315aa9
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/audio/codecDescriptor.cpp
View file @
d792b6b0
...
...
@@ -43,7 +43,8 @@ CodecDescriptor::init()
_codecMap
[
PAYLOAD_CODEC_ULAW
]
=
"PCMU"
;
_codecMap
[
PAYLOAD_CODEC_GSM
]
=
"GSM"
;
_codecMap
[
PAYLOAD_CODEC_ALAW
]
=
"PCMA"
;
_codecMap
[
PAYLOAD_CODEC_ILBC_20
]
=
"iLBC"
;
//_codecMap[PAYLOAD_CODEC_ILBC_20] = "iLBC";
_codecMap
[
PAYLOAD_CODEC_SPEEX_8000
]
=
"speex"
;;
}
...
...
@@ -51,9 +52,11 @@ void
CodecDescriptor
::
setDefaultOrder
()
{
_codecOrder
.
clear
();
//_codecOrder.push_back(PAYLOAD_CODEC_ILBC_20);
_codecOrder
.
push_back
(
PAYLOAD_CODEC_ULAW
);
_codecOrder
.
push_back
(
PAYLOAD_CODEC_ALAW
);
_codecOrder
.
push_back
(
PAYLOAD_CODEC_GSM
);
//_codecOrder.push_back(PAYLOAD_CODEC_SPEEX_8000);
}
std
::
string
&
...
...
@@ -154,6 +157,15 @@ CodecDescriptor::getSampleRate(CodecType payload)
case
PAYLOAD_CODEC_ILBC_20
:
printf
(
"PAYLOAD = %i
\n
"
,
payload
);
return
8000
;
case
PAYLOAD_CODEC_SPEEX_8000
:
printf
(
"PAYLOAD = %i
\n
"
,
payload
);
return
8000
;
case
PAYLOAD_CODEC_SPEEX_16000
:
printf
(
"PAYLOAD = %i
\n
"
,
payload
);
return
16000
;
case
PAYLOAD_CODEC_SPEEX_32000
:
printf
(
"PAYLOAD = %i
\n
"
,
payload
);
return
32000
;
default:
return
-
1
;
}
...
...
src/managerimpl.cpp
View file @
d792b6b0
...
...
@@ -1090,7 +1090,7 @@ ManagerImpl::initAudioCodec (void)
// init list of all supported codecs
_codecDescriptorMap
.
init
();
// if the user never set the codec list, use the default one
if
(
getConfigString
(
AUDIO
,
"Active
c
odecs"
)
==
""
){
if
(
getConfigString
(
AUDIO
,
"Active
C
odecs"
)
==
""
){
_codecDescriptorMap
.
setDefaultOrder
();
}
// else retrieve the one he set in the config file
...
...
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