Commit ba5c45ef authored by Emmanuel Milou's avatar Emmanuel Milou
Browse files

Change version of license GPL 2 -> GPL 3

parent 18305aa6
......@@ -4,7 +4,7 @@
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
......
......@@ -4,7 +4,7 @@
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
......
......@@ -4,7 +4,7 @@
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
......
......@@ -4,7 +4,7 @@
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
......
......@@ -4,7 +4,7 @@
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
......
......@@ -5,7 +5,7 @@
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
......
......@@ -5,7 +5,7 @@
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
......
......@@ -5,7 +5,7 @@
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
......
......@@ -5,7 +5,7 @@
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
......
......@@ -5,7 +5,7 @@
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
......
......@@ -5,7 +5,7 @@
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
......
......@@ -5,7 +5,7 @@
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
......
......@@ -5,7 +5,7 @@
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
......
......@@ -5,7 +5,7 @@
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
......
......@@ -5,7 +5,7 @@
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
......
......@@ -1085,20 +1085,11 @@ void
ManagerImpl::initAudioCodec (void)
{
_debugInit("Active Codecs");
// TODO: need to be more dynamic...
//_codecDescriptorMap.setActive(getConfigString(AUDIO, CODEC1));
//_codecDescriptorMap.setActive(getConfigString(AUDIO, CODEC2));
//_codecDescriptorMap.setActive(getConfigString(AUDIO, CODEC3));
_codecDescriptorMap.setActive(getConfigString("Audio", "Codecs.codec1"));
//_codecDescriptorMap.setActive(getConfigString("Audio", "Codec.codec2"));
//_codecDescriptorMap.setActive(getConfigString("Audio", "Codec.codec3"));
_codecDescriptorMap.setActive(getConfigString("Audio", "Codecs.codec1"));
//_codecDescriptorMap.setActive(getConfigString("Audio", "Codec.codec2"));
//_codecDescriptorMap.setActive(getConfigString("Audio", "Codec.codec3"));
}
/**
* Set prefered codec order
*/
void
ManagerImpl::setPreferedCodec(const ::DBus::String& codec_name)
{
......@@ -1127,13 +1118,32 @@ ManagerImpl::getPreferedCodec()
std::vector <std::string>
ManagerImpl::getDefaultCodecList( void )
{
std::vector< std::string > v;
v.push_back(DFT_CODEC1); // G711u
v.push_back(DFT_CODEC2); // G711a
v.push_back(DFT_CODEC3); // GSM
return v;
std::vector< std::string > v;
std::string desc=DFT_CODEC1;
std::string rate=""+clockRate(desc);
printf("%s\n",rate.c_str());
v.push_back(DFT_CODEC1); // G711u
v.push_back(DFT_CODEC2); // G711a
v.push_back(DFT_CODEC3); // GSM
return v;
}
unsigned int
ManagerImpl::clockRate(std::string& name)
{
CodecMap codecs = _codecDescriptorMap.getMap();
CodecMap::iterator iter = codecs.begin();
while(iter!=codecs.end())
{
if(iter->second!=NULL)
{
if(iter->second->getDescription() == name)
return iter->second->getClockRate();
}
iter++;
}
return -1;
}
/**
* Get the list of codecs.
......@@ -1143,6 +1153,9 @@ std::vector< std::string >
ManagerImpl::getCodecList( void )
{
std::vector< std::string > v;
std::string desc=getConfigString(AUDIO, "Codecs.codec1");
std::string rate=clockRate(desc).strstream();
printf("%s\n",rate.c_str());
v.push_back(getConfigString(AUDIO, "Codecs.codec1"));
v.push_back( getConfigString(AUDIO, "Codecs.codec2"));
v.push_back( getConfigString(AUDIO, "Codecs.codec3"));
......
......@@ -256,7 +256,8 @@ public:
void removeAccount(const AccountID& accountID);
/*
* get the default account
* Get the default account
* @return The default account
*/
std::string getDefaultAccount();
......@@ -270,13 +271,13 @@ public:
/**
* Get the prefered codec
* @return The name of the prefered codec
* @return The description of the prefered codec
*/
std::string getPreferedCodec( );
/**
* Get the list of codecs we supports, ordered by the user
* @ return The list of the codecs
* @return The list of the codecs
*/
std::vector< ::DBus::String > getCodecList( void );
......@@ -286,10 +287,23 @@ public:
*/
std::vector< ::DBus::String > getDefaultCodecList( void );
/**
* Get the sample rate of a codec
* @param name: The description of the codec
* @return The sample rate of the specified codec
*/
unsigned int clockRate(std::string& name);
/**
* Get the list of the standart sound sample rates
* Values: { 44100 , 44000 , 96000 }
* @return The list of the sample rates
*/
std::vector< ::DBus::String> getSampleRateList( void );
/*
* Set an account as default
* @param The ID of the account we want to set as default
*/
void setDefaultAccount(const AccountID& accountID);
......@@ -637,4 +651,4 @@ private:
};
#endif // __MANAGER_H__
t#endif // __MANAGER_H__
......@@ -4,7 +4,7 @@
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
......
......@@ -4,7 +4,7 @@
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
......
......@@ -5,7 +5,7 @@
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment