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

Side by Side Diff: content/renderer/media/gpu/rtc_video_decoder_unittest.cc

Issue 2757913002: Remove feedback mode from RTCVideoDecoder. (Closed)
Patch Set: Created 3 years, 9 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 unified diff | Download patch
« no previous file with comments | « content/renderer/media/gpu/rtc_video_decoder.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <stdint.h> 5 #include <stdint.h>
6 #include <string.h> 6 #include <string.h>
7 7
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/location.h" 9 #include "base/location.h"
10 #include "base/single_thread_task_runner.h" 10 #include "base/single_thread_task_runner.h"
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 webrtc::kVideoCodecI420, mock_gpu_factories_.get())); 173 webrtc::kVideoCodecI420, mock_gpu_factories_.get()));
174 EXPECT_EQ(NULL, null_rtc_decoder.get()); 174 EXPECT_EQ(NULL, null_rtc_decoder.get());
175 } 175 }
176 176
177 TEST_P(RTCVideoDecoderTest, CreateAndInitSucceeds) { 177 TEST_P(RTCVideoDecoderTest, CreateAndInitSucceeds) {
178 const webrtc::VideoCodecType codec_type = GetParam(); 178 const webrtc::VideoCodecType codec_type = GetParam();
179 CreateDecoder(codec_type); 179 CreateDecoder(codec_type);
180 EXPECT_EQ(WEBRTC_VIDEO_CODEC_OK, rtc_decoder_->InitDecode(&codec_, 1)); 180 EXPECT_EQ(WEBRTC_VIDEO_CODEC_OK, rtc_decoder_->InitDecode(&codec_, 1));
181 } 181 }
182 182
183 TEST_F(RTCVideoDecoderTest, InitDecodeReturnsErrorOnFeedbackMode) {
184 CreateDecoder(webrtc::kVideoCodecVP8);
185 codec_.VP8()->feedbackModeOn = true;
186 EXPECT_EQ(WEBRTC_VIDEO_CODEC_ERROR, rtc_decoder_->InitDecode(&codec_, 1));
187 }
188
189 TEST_F(RTCVideoDecoderTest, DecodeReturnsErrorWithoutInitDecode) { 183 TEST_F(RTCVideoDecoderTest, DecodeReturnsErrorWithoutInitDecode) {
190 CreateDecoder(webrtc::kVideoCodecVP8); 184 CreateDecoder(webrtc::kVideoCodecVP8);
191 webrtc::EncodedImage input_image; 185 webrtc::EncodedImage input_image;
192 EXPECT_EQ(WEBRTC_VIDEO_CODEC_UNINITIALIZED, 186 EXPECT_EQ(WEBRTC_VIDEO_CODEC_UNINITIALIZED,
193 rtc_decoder_->Decode(input_image, false, nullptr, nullptr, 0)); 187 rtc_decoder_->Decode(input_image, false, nullptr, nullptr, 0));
194 } 188 }
195 189
196 TEST_F(RTCVideoDecoderTest, DecodeReturnsErrorOnIncompleteFrame) { 190 TEST_F(RTCVideoDecoderTest, DecodeReturnsErrorOnIncompleteFrame) {
197 CreateDecoder(webrtc::kVideoCodecVP8); 191 CreateDecoder(webrtc::kVideoCodecVP8);
198 Initialize(); 192 Initialize();
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
340 EXPECT_EQ(WEBRTC_VIDEO_CODEC_OK, 334 EXPECT_EQ(WEBRTC_VIDEO_CODEC_OK,
341 rtc_decoder_->Decode(input_image, false, nullptr, nullptr, 0)); 335 rtc_decoder_->Decode(input_image, false, nullptr, nullptr, 0));
342 } 336 }
343 337
344 INSTANTIATE_TEST_CASE_P(CodecProfiles, 338 INSTANTIATE_TEST_CASE_P(CodecProfiles,
345 RTCVideoDecoderTest, 339 RTCVideoDecoderTest,
346 Values(webrtc::kVideoCodecVP8, 340 Values(webrtc::kVideoCodecVP8,
347 webrtc::kVideoCodecH264)); 341 webrtc::kVideoCodecH264));
348 342
349 } // content 343 } // content
OLDNEW
« no previous file with comments | « content/renderer/media/gpu/rtc_video_decoder.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698