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

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

Issue 1490703002: Revert of Add _decoder CHECK to VCMGenericDecoder constructor. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 5 years, 1 month 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
« no previous file with comments | « webrtc/modules/video_coding/generic_decoder.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/modules/video_coding/generic_decoder.cc
diff --git a/webrtc/modules/video_coding/generic_decoder.cc b/webrtc/modules/video_coding/generic_decoder.cc
index 294a9030c5c06106c090d17e208dfd2d4b31e405..092d0546ca48615bde27eb5eb184772068081d5a 100644
--- a/webrtc/modules/video_coding/generic_decoder.cc
+++ b/webrtc/modules/video_coding/generic_decoder.cc
@@ -8,11 +8,10 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "webrtc/base/checks.h"
#include "webrtc/base/logging.h"
#include "webrtc/base/trace_event.h"
+#include "webrtc/modules/video_coding/include/video_coding.h"
#include "webrtc/modules/video_coding/generic_decoder.h"
-#include "webrtc/modules/video_coding/include/video_coding.h"
#include "webrtc/modules/video_coding/internal_defines.h"
#include "webrtc/system_wrappers/include/clock.h"
@@ -132,15 +131,16 @@
return VCM_OK;
}
-VCMGenericDecoder::VCMGenericDecoder(VideoDecoder* decoder, bool isExternal)
- : _callback(NULL),
- _frameInfos(),
- _nextFrameInfoIdx(0),
- _decoder(decoder),
- _codecType(kVideoCodecUnknown),
- _isExternal(isExternal),
- _keyFrameDecoded(false) {
- RTC_CHECK(_decoder);
+VCMGenericDecoder::VCMGenericDecoder(VideoDecoder& decoder, bool isExternal)
+:
+_callback(NULL),
+_frameInfos(),
+_nextFrameInfoIdx(0),
+_decoder(decoder),
+_codecType(kVideoCodecUnknown),
+_isExternal(isExternal),
+_keyFrameDecoded(false)
+{
}
VCMGenericDecoder::~VCMGenericDecoder()
@@ -153,7 +153,7 @@
TRACE_EVENT0("webrtc", "VCMGenericDecoder::InitDecode");
_codecType = settings->codecType;
- return _decoder->InitDecode(settings, numberOfCores);
+ return _decoder.InitDecode(settings, numberOfCores);
}
int32_t VCMGenericDecoder::Decode(const VCMEncodedFrame& frame, int64_t nowMs) {
@@ -165,7 +165,7 @@
_callback->Map(frame.TimeStamp(), &_frameInfos[_nextFrameInfoIdx]);
_nextFrameInfoIdx = (_nextFrameInfoIdx + 1) % kDecoderFrameMemoryLength;
- int32_t ret = _decoder->Decode(frame.EncodedImage(),
+ int32_t ret = _decoder.Decode(frame.EncodedImage(),
frame.MissingFrame(),
frame.FragmentationHeader(),
frame.CodecSpecific(),
@@ -190,18 +190,18 @@
int32_t
VCMGenericDecoder::Release()
{
- return _decoder->Release();
+ return _decoder.Release();
}
int32_t VCMGenericDecoder::Reset()
{
- return _decoder->Reset();
+ return _decoder.Reset();
}
int32_t VCMGenericDecoder::RegisterDecodeCompleteCallback(VCMDecodedFrameCallback* callback)
{
_callback = callback;
- return _decoder->RegisterDecodeCompleteCallback(callback);
+ return _decoder.RegisterDecodeCompleteCallback(callback);
}
bool VCMGenericDecoder::External() const
« no previous file with comments | « webrtc/modules/video_coding/generic_decoder.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698