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

Unified Diff: webrtc/test/fake_decoder.cc

Issue 2378003002: Delete webrtc::VideoFrame::CreateEmptyFrame. (Closed)
Patch Set: Added size_t/int cast, needed for windows 64-bit builds. Created 4 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
« no previous file with comments | « webrtc/test/fake_decoder.h ('k') | webrtc/test/frame_generator.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/test/fake_decoder.cc
diff --git a/webrtc/test/fake_decoder.cc b/webrtc/test/fake_decoder.cc
index 103b41ce56b525a778bf8866e0ba6c836ed2dd83..4a35e78921b96f0abf141703e4419653ecd00142 100644
--- a/webrtc/test/fake_decoder.cc
+++ b/webrtc/test/fake_decoder.cc
@@ -20,13 +20,6 @@ FakeDecoder::FakeDecoder() : callback_(NULL) {}
int32_t FakeDecoder::InitDecode(const VideoCodec* config,
int32_t number_of_cores) {
config_ = *config;
- size_t width = config->width;
- size_t height = config->height;
- frame_.CreateEmptyFrame(static_cast<int>(width),
- static_cast<int>(height),
- static_cast<int>(width),
- static_cast<int>((width + 1) / 2),
- static_cast<int>((width + 1) / 2));
return WEBRTC_VIDEO_CODEC_OK;
}
@@ -35,11 +28,13 @@ int32_t FakeDecoder::Decode(const EncodedImage& input,
const RTPFragmentationHeader* fragmentation,
const CodecSpecificInfo* codec_specific_info,
int64_t render_time_ms) {
- frame_.set_timestamp(input._timeStamp);
- frame_.set_ntp_time_ms(input.ntp_time_ms_);
- frame_.set_render_time_ms(render_time_ms);
+ VideoFrame frame(I420Buffer::Create(config_.width, config_.height),
+ webrtc::kVideoRotation_0,
+ render_time_ms * rtc::kNumMicrosecsPerMillisec);
+ frame.set_timestamp(input._timeStamp);
+ frame.set_ntp_time_ms(input.ntp_time_ms_);
- callback_->Decoded(frame_);
+ callback_->Decoded(frame);
return WEBRTC_VIDEO_CODEC_OK;
}
« no previous file with comments | « webrtc/test/fake_decoder.h ('k') | webrtc/test/frame_generator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698