Removed Version function from all modules.

TBR=henrik_a
Review URL: http://webrtc-codereview.appspot.com/329023

git-svn-id: http://webrtc.googlecode.com/svn/trunk@1330 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
pwestin@webrtc.org
2012-01-04 15:00:12 +00:00
parent 94558d83bf
commit c450a19669
42 changed files with 5 additions and 979 deletions

View File

@@ -80,25 +80,6 @@ class AudioCodingModule: public Module {
// Utility functions
//
///////////////////////////////////////////////////////////////////////////
// WebRtc_Word32 GetVersion()
// Returns version of the module and its components.
//
// Outputs:
// -version : a buffer that the version string is stored.
// -remainBuffBytes : remaining size of the buffer "version" in
// bytes, excluding terminating-null.
// -position : the first character of the ACM version will
// written to version[position] and so on.
//
// Return value:
// -1 if failed to write the whole version string,
// 0 if succeeded.
//
static WebRtc_Word32 GetVersion(WebRtc_Word8* version,
WebRtc_UWord32& remainBuffBytes,
WebRtc_UWord32& position);
///////////////////////////////////////////////////////////////////////////
// WebRtc_UWord8 NumberOfCodecs()
// Returns number of supported codecs.

View File

@@ -33,42 +33,6 @@ AudioCodingModule::Destroy(
delete static_cast<AudioCodingModuleImpl*> (module);
}
// Returns version of the module and its components.
WebRtc_Word32
AudioCodingModule::GetVersion(
WebRtc_Word8* version,
WebRtc_UWord32& remainingBufferInBytes,
WebRtc_UWord32& position)
{
WebRtc_Word32 len = position;
strncpy(&version[position], "AudioCodingModule 1.3.0\n", remainingBufferInBytes);
position = static_cast<WebRtc_UWord32>(strlen(version));
remainingBufferInBytes -= (position - len);
// Get NetEQ version.
if(ACMNetEQ::GetVersion(version,
remainingBufferInBytes, position) < 0)
{
return -1;
}
// Set position and size before calling ACMCodecDB::CodecsVersion
// to get versions of all codecs.
size_t current_position = position;
size_t current_remaining_bytes = remainingBufferInBytes;
if(ACMCodecDB::CodecsVersion(version,
&current_remaining_bytes, &current_position) < 0)
{
return -1;
}
// Update position and size of version vector.
remainingBufferInBytes = current_remaining_bytes;
position = current_position;
return 0;
}
// Get number of supported codecs
WebRtc_UWord8 AudioCodingModule::NumberOfCodecs()
{

View File

@@ -289,23 +289,6 @@ AudioCodingModuleImpl::ChangeUniqueId(
return 0;
}
WebRtc_Word32
AudioCodingModuleImpl::Version(
WebRtc_Word8* version,
WebRtc_UWord32& remainingBufferInBytes,
WebRtc_UWord32& position) const
{
WEBRTC_TRACE(webrtc::kTraceModuleCall, webrtc::kTraceAudioCoding, _id,
"Version()");
if(version == NULL)
{
WEBRTC_TRACE(webrtc::kTraceError, webrtc::kTraceAudioCoding, _id,
"Input buffer is NULL");
return -1;
}
return GetVersion(version, remainingBufferInBytes, position);
}
// returns the number of milliseconds until the module want a
// worker thread to call Process
WebRtc_Word32

View File

@@ -109,14 +109,6 @@ TEST(AudioCodingModuleTest, RunAllTests)
std::vector<ACMTest*> tests;
PopulateTests(&tests);
std::vector<ACMTest*>::iterator it;
WebRtc_Word8 version[5000];
version[0] = '\0';
WebRtc_UWord32 remainingBufferInByte = 4999;
WebRtc_UWord32 position = 0;
AudioCodingModule::GetVersion(version, remainingBufferInByte, position);
printf("%s\n", version);
for (it=tests.begin() ; it < tests.end(); it++)
{
(*it)->Perform();