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:
@@ -229,51 +229,6 @@ VideoCodingModuleImpl::Process()
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
// Returns version of the module and its components
|
||||
WebRtc_Word32
|
||||
VideoCodingModuleImpl::Version(WebRtc_Word8* version,
|
||||
WebRtc_UWord32& remainingBufferInBytes,
|
||||
WebRtc_UWord32& position) const
|
||||
{
|
||||
WEBRTC_TRACE(webrtc::kTraceModuleCall,
|
||||
webrtc::kTraceVideoCoding,
|
||||
VCMId(_id),
|
||||
"Version()");
|
||||
if (version == NULL)
|
||||
{
|
||||
WEBRTC_TRACE(webrtc::kTraceWarning,
|
||||
webrtc::kTraceVideoCoding,
|
||||
VCMId(_id),
|
||||
"Invalid buffer pointer in argument to Version()");
|
||||
return VCM_PARAMETER_ERROR;
|
||||
}
|
||||
WebRtc_Word8 ourVersion[] = "VideoCodingModule 1.1.0\n";
|
||||
WebRtc_UWord32 ourLength = (WebRtc_UWord32)strlen(ourVersion);
|
||||
if (remainingBufferInBytes < ourLength)
|
||||
{
|
||||
return VCM_MEMORY;
|
||||
}
|
||||
memcpy(&version[position], ourVersion, ourLength);
|
||||
remainingBufferInBytes -= ourLength;
|
||||
position += ourLength;
|
||||
|
||||
// Safe to truncate here.
|
||||
WebRtc_Word32 ret = _codecDataBase.Version(version,
|
||||
remainingBufferInBytes,
|
||||
position);
|
||||
if (ret < 0)
|
||||
{
|
||||
return ret;
|
||||
}
|
||||
// Ensure the strlen call is safe by terminating at the end of version.
|
||||
version[position + remainingBufferInBytes - 1] = '\0';
|
||||
ourLength = (WebRtc_UWord32)strlen(&version[position]);
|
||||
remainingBufferInBytes -= (ourLength + 1); // include null termination.
|
||||
position += (ourLength + 1);
|
||||
|
||||
return VCM_OK;
|
||||
}
|
||||
|
||||
WebRtc_Word32
|
||||
VideoCodingModuleImpl::Id() const
|
||||
{
|
||||
|
||||
@@ -63,11 +63,6 @@ public:
|
||||
|
||||
virtual ~VideoCodingModuleImpl();
|
||||
|
||||
// Returns version of the module and its components
|
||||
WebRtc_Word32 Version(WebRtc_Word8* version,
|
||||
WebRtc_UWord32& remainingBufferInBytes,
|
||||
WebRtc_UWord32& position) const;
|
||||
|
||||
WebRtc_Word32 Id() const;
|
||||
|
||||
// Change the unique identifier of this object
|
||||
|
||||
Reference in New Issue
Block a user