Skip to content
Snippets Groups Projects
Commit 50456709 authored by Tristan Matthews's avatar Tristan Matthews
Browse files

audiocodecfactory: cleanup

parent c09da893
No related branches found
No related tags found
No related merge requests found
...@@ -41,11 +41,6 @@ AudioCodecFactory::AudioCodecFactory() : _CodecsMap(), _defaultCodecOrder(), _Ca ...@@ -41,11 +41,6 @@ AudioCodecFactory::AudioCodecFactory() : _CodecsMap(), _defaultCodecOrder(), _Ca
{ {
} }
AudioCodecFactory::~AudioCodecFactory()
{
}
void void
AudioCodecFactory::init() AudioCodecFactory::init()
{ {
...@@ -103,13 +98,12 @@ double AudioCodecFactory::getBitRate (AudioCodecType payload) ...@@ -103,13 +98,12 @@ double AudioCodecFactory::getBitRate (AudioCodecType payload)
} }
int AudioCodecFactory::getSampleRate (AudioCodecType payload) int AudioCodecFactory::getSampleRate (AudioCodecType payload) const
{ {
CodecsMap::const_iterator iter = _CodecsMap.find (payload);
CodecsMap::iterator iter = _CodecsMap.find (payload);
if (iter != _CodecsMap.end()) if (iter != _CodecsMap.end())
return (iter->second->getClockRate()); return iter->second->getClockRate();
return 0; return 0;
} }
...@@ -130,9 +124,9 @@ void AudioCodecFactory::saveActiveCodecs (const std::vector<std::string>& list) ...@@ -130,9 +124,9 @@ void AudioCodecFactory::saveActiveCodecs (const std::vector<std::string>& list)
void void
AudioCodecFactory::deleteHandlePointer (void) AudioCodecFactory::deleteHandlePointer (void)
{ {
for (size_t i = 0 ; i < _CodecInMemory.size() ; i++) { for (std::vector<CodecHandlePointer>::const_iterator iter =
unloadCodec (_CodecInMemory[i]); _CodecInMemory.begin(); iter != _CodecInMemory.end(); ++iter)
} unloadCodec (*iter);
_CodecInMemory.clear(); _CodecInMemory.clear();
} }
......
...@@ -60,11 +60,6 @@ class AudioCodecFactory ...@@ -60,11 +60,6 @@ class AudioCodecFactory
*/ */
AudioCodecFactory(); AudioCodecFactory();
/**
* Destructor
*/
~AudioCodecFactory();
/** /**
* Accessor to data structures * Accessor to data structures
* @return CodecsMap& The available codec * @return CodecsMap& The available codec
...@@ -111,7 +106,7 @@ class AudioCodecFactory ...@@ -111,7 +106,7 @@ class AudioCodecFactory
* @param payload The payload of the codec * @param payload The payload of the codec
* @return int The clock rate of the specified codec * @return int The clock rate of the specified codec
*/ */
int getSampleRate (AudioCodecType payload); int getSampleRate (AudioCodecType payload) const;
/** /**
* Set the order of codecs by their payload * Set the order of codecs by their payload
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment