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

Side by Side Diff: webrtc/media/engine/videoencodersoftwarefallbackwrapper_unittest.cc

Issue 2493133002: Stop using hardcoded payload types for video codecs (Closed)
Patch Set: Rebase again 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 /* 1 /*
2 * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 10 matching lines...) Expand all
21 21
22 namespace webrtc { 22 namespace webrtc {
23 23
24 const int kWidth = 320; 24 const int kWidth = 320;
25 const int kHeight = 240; 25 const int kHeight = 240;
26 const size_t kMaxPayloadSize = 800; 26 const size_t kMaxPayloadSize = 800;
27 27
28 class VideoEncoderSoftwareFallbackWrapperTest : public ::testing::Test { 28 class VideoEncoderSoftwareFallbackWrapperTest : public ::testing::Test {
29 protected: 29 protected:
30 VideoEncoderSoftwareFallbackWrapperTest() 30 VideoEncoderSoftwareFallbackWrapperTest()
31 : fallback_wrapper_(kVideoCodecVP8, &fake_encoder_) {} 31 : fallback_wrapper_(cricket::VideoCodec("VP8"), &fake_encoder_) {}
32 32
33 class CountingFakeEncoder : public VideoEncoder { 33 class CountingFakeEncoder : public VideoEncoder {
34 public: 34 public:
35 int32_t InitEncode(const VideoCodec* codec_settings, 35 int32_t InitEncode(const VideoCodec* codec_settings,
36 int32_t number_of_cores, 36 int32_t number_of_cores,
37 size_t max_payload_size) override { 37 size_t max_payload_size) override {
38 ++init_encode_count_; 38 ++init_encode_count_;
39 return init_encode_return_code_; 39 return init_encode_return_code_;
40 } 40 }
41 int32_t Encode(const VideoFrame& frame, 41 int32_t Encode(const VideoFrame& frame,
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after
308 308
309 TEST_F(VideoEncoderSoftwareFallbackWrapperTest, 309 TEST_F(VideoEncoderSoftwareFallbackWrapperTest,
310 ReportsFallbackImplementationName) { 310 ReportsFallbackImplementationName) {
311 UtilizeFallbackEncoder(); 311 UtilizeFallbackEncoder();
312 // Hard coded expected value since libvpx is the software implementation name 312 // Hard coded expected value since libvpx is the software implementation name
313 // for VP8. Change accordingly if the underlying implementation does. 313 // for VP8. Change accordingly if the underlying implementation does.
314 CheckLastEncoderName("libvpx"); 314 CheckLastEncoderName("libvpx");
315 } 315 }
316 316
317 } // namespace webrtc 317 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/media/engine/videoencodersoftwarefallbackwrapper.cc ('k') | webrtc/media/engine/webrtcvideoengine2.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698