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

Side by Side Diff: webrtc/video/encoder_state_feedback_unittest.cc

Issue 1654913002: Untangle ViEChannel and ViEEncoder. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: deregister protection callback before destroying vie_channel_ Created 4 years, 10 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
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2012 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 13 matching lines...) Expand all
24 #include "webrtc/video/payload_router.h" 24 #include "webrtc/video/payload_router.h"
25 #include "webrtc/video/vie_encoder.h" 25 #include "webrtc/video/vie_encoder.h"
26 26
27 using ::testing::NiceMock; 27 using ::testing::NiceMock;
28 28
29 namespace webrtc { 29 namespace webrtc {
30 30
31 class MockVieEncoder : public ViEEncoder { 31 class MockVieEncoder : public ViEEncoder {
32 public: 32 public:
33 explicit MockVieEncoder(ProcessThread* process_thread, PacedSender* pacer) 33 explicit MockVieEncoder(ProcessThread* process_thread, PacedSender* pacer)
34 : ViEEncoder(1, process_thread, nullptr, nullptr, pacer, nullptr) {} 34 : ViEEncoder(1,
35 process_thread,
36 nullptr,
37 nullptr,
38 pacer,
39 nullptr,
40 nullptr) {}
35 ~MockVieEncoder() {} 41 ~MockVieEncoder() {}
36 42
37 MOCK_METHOD1(OnReceivedIntraFrameRequest, 43 MOCK_METHOD1(OnReceivedIntraFrameRequest,
38 void(uint32_t)); 44 void(uint32_t));
39 MOCK_METHOD2(OnReceivedSLI, 45 MOCK_METHOD2(OnReceivedSLI,
40 void(uint32_t ssrc, uint8_t picture_id)); 46 void(uint32_t ssrc, uint8_t picture_id));
41 MOCK_METHOD2(OnReceivedRPSI, 47 MOCK_METHOD2(OnReceivedRPSI,
42 void(uint32_t ssrc, uint64_t picture_id)); 48 void(uint32_t ssrc, uint64_t picture_id));
43 MOCK_METHOD2(OnLocalSsrcChanged, 49 MOCK_METHOD2(OnLocalSsrcChanged,
44 void(uint32_t old_ssrc, uint32_t new_ssrc)); 50 void(uint32_t old_ssrc, uint32_t new_ssrc));
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 139
134 encoder_state_feedback_->RemoveEncoder(&encoder_1); 140 encoder_state_feedback_->RemoveEncoder(&encoder_1);
135 EXPECT_CALL(encoder_2, OnReceivedIntraFrameRequest(ssrc_2)) 141 EXPECT_CALL(encoder_2, OnReceivedIntraFrameRequest(ssrc_2))
136 .Times(1); 142 .Times(1);
137 encoder_state_feedback_->GetRtcpIntraFrameObserver()-> 143 encoder_state_feedback_->GetRtcpIntraFrameObserver()->
138 OnReceivedIntraFrameRequest(ssrc_2); 144 OnReceivedIntraFrameRequest(ssrc_2);
139 encoder_state_feedback_->RemoveEncoder(&encoder_2); 145 encoder_state_feedback_->RemoveEncoder(&encoder_2);
140 } 146 }
141 147
142 } // namespace webrtc 148 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698