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

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

Issue 2449353003: Stop using webrtc::VideoCodec.codecSpecific (Closed)
Patch Set: Created 4 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 unified diff | Download patch
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 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
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) { 183 TEST_F(RTCVideoDecoderTest, InitDecodeReturnsErrorOnFeedbackMode) {
184 CreateDecoder(webrtc::kVideoCodecVP8); 184 CreateDecoder(webrtc::kVideoCodecVP8);
185 codec_.codecSpecific.VP8.feedbackModeOn = true; 185 codec_.VP8()->feedbackModeOn = true;
wuchengli 2016/10/26 13:53:50 Why this uses VP8()->feedbackModeOn and rtc_video_
186 EXPECT_EQ(WEBRTC_VIDEO_CODEC_ERROR, rtc_decoder_->InitDecode(&codec_, 1)); 186 EXPECT_EQ(WEBRTC_VIDEO_CODEC_ERROR, rtc_decoder_->InitDecode(&codec_, 1));
187 } 187 }
188 188
189 TEST_F(RTCVideoDecoderTest, DecodeReturnsErrorWithoutInitDecode) { 189 TEST_F(RTCVideoDecoderTest, DecodeReturnsErrorWithoutInitDecode) {
190 CreateDecoder(webrtc::kVideoCodecVP8); 190 CreateDecoder(webrtc::kVideoCodecVP8);
191 webrtc::EncodedImage input_image; 191 webrtc::EncodedImage input_image;
192 EXPECT_EQ(WEBRTC_VIDEO_CODEC_UNINITIALIZED, 192 EXPECT_EQ(WEBRTC_VIDEO_CODEC_UNINITIALIZED,
193 rtc_decoder_->Decode(input_image, false, nullptr, nullptr, 0)); 193 rtc_decoder_->Decode(input_image, false, nullptr, nullptr, 0));
194 } 194 }
195 195
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
316 rtc_decoder_->Decode(input_image, false, nullptr, nullptr, 0)); 316 rtc_decoder_->Decode(input_image, false, nullptr, nullptr, 0));
317 EXPECT_EQ(2, rtc_decoder_->GetVDAErrorCounterForTesting()); 317 EXPECT_EQ(2, rtc_decoder_->GetVDAErrorCounterForTesting());
318 } 318 }
319 319
320 INSTANTIATE_TEST_CASE_P(CodecProfiles, 320 INSTANTIATE_TEST_CASE_P(CodecProfiles,
321 RTCVideoDecoderTest, 321 RTCVideoDecoderTest,
322 Values(webrtc::kVideoCodecVP8, 322 Values(webrtc::kVideoCodecVP8,
323 webrtc::kVideoCodecH264)); 323 webrtc::kVideoCodecH264));
324 324
325 } // content 325 } // content
OLDNEW
« no previous file with comments | « content/renderer/media/gpu/rtc_video_decoder.cc ('k') | content/renderer/media/gpu/rtc_video_encoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698