Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(388)

Unified Diff: webrtc/modules/video_coding/main/source/generic_decoder.cc

Issue 1358863002: Simplify VCMTimestampMap. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: feedback Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: webrtc/modules/video_coding/main/source/generic_decoder.cc
diff --git a/webrtc/modules/video_coding/main/source/generic_decoder.cc b/webrtc/modules/video_coding/main/source/generic_decoder.cc
index 1cd67dfddfbb2a176bcfb48dc697e58cbeb83a30..f874e163c83f6ad3a3362cefe32a014f23585059 100644
--- a/webrtc/modules/video_coding/main/source/generic_decoder.cc
+++ b/webrtc/modules/video_coding/main/source/generic_decoder.cc
@@ -53,8 +53,7 @@ int32_t VCMDecodedFrameCallback::Decoded(VideoFrame& decodedImage) {
VCMReceiveCallback* callback;
{
CriticalSectionScoped cs(_critSect);
- frameInfo = static_cast<VCMFrameInformation*>(
- _timestampMap.Pop(decodedImage.timestamp()));
+ frameInfo = _timestampMap.Pop(decodedImage.timestamp());
callback = _receiveCallback;
}
@@ -103,10 +102,10 @@ uint64_t VCMDecodedFrameCallback::LastReceivedPictureID() const
return _lastReceivedPictureID;
}
-int32_t VCMDecodedFrameCallback::Map(uint32_t timestamp, VCMFrameInformation* frameInfo)
-{
- CriticalSectionScoped cs(_critSect);
- return _timestampMap.Add(timestamp, frameInfo);
+void VCMDecodedFrameCallback::Map(uint32_t timestamp,
+ VCMFrameInformation* frameInfo) {
+ CriticalSectionScoped cs(_critSect);
+ _timestampMap.Add(timestamp, frameInfo);
}
int32_t VCMDecodedFrameCallback::Pop(uint32_t timestamp)
« no previous file with comments | « webrtc/modules/video_coding/main/source/generic_decoder.h ('k') | webrtc/modules/video_coding/main/source/timestamp_map.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698