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

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

Issue 2888303003: Work-in-progress upload to add worker task queue to PC factory.
Patch Set: Rebase. Created 3 years, 7 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 | « webrtc/media/base/mediaengine.h ('k') | webrtc/media/engine/webrtcmediaengine.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2016 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
11 #include "webrtc/media/engine/nullwebrtcvideoengine.h" 11 #include "webrtc/media/engine/nullwebrtcvideoengine.h"
12 #include "webrtc/media/engine/webrtcvoiceengine.h" 12 #include "webrtc/media/engine/webrtcvoiceengine.h"
13 #include "webrtc/test/gtest.h" 13 #include "webrtc/test/gtest.h"
14 #include "webrtc/test/mock_audio_decoder_factory.h" 14 #include "webrtc/test/mock_audio_decoder_factory.h"
15 #include "webrtc/test/mock_audio_encoder_factory.h" 15 #include "webrtc/test/mock_audio_encoder_factory.h"
16 16
17 namespace cricket { 17 namespace cricket {
18 18
19 class WebRtcMediaEngineNullVideo 19 class WebRtcMediaEngineNullVideo
20 : public CompositeMediaEngine<WebRtcVoiceEngine, NullWebRtcVideoEngine> { 20 : public CompositeMediaEngine<WebRtcVoiceEngine, NullWebRtcVideoEngine> {
21 public: 21 public:
22 WebRtcMediaEngineNullVideo( 22 WebRtcMediaEngineNullVideo(
23 webrtc::AudioDeviceModule* adm, 23 webrtc::AudioDeviceModule* adm,
24 const rtc::scoped_refptr<webrtc::AudioEncoderFactory>& 24 const rtc::scoped_refptr<webrtc::AudioEncoderFactory>&
25 audio_encoder_factory, 25 audio_encoder_factory,
26 const rtc::scoped_refptr<webrtc::AudioDecoderFactory>& 26 const rtc::scoped_refptr<webrtc::AudioDecoderFactory>&
27 audio_decoder_factory, 27 audio_decoder_factory,
28 WebRtcVideoEncoderFactory* video_encoder_factory, 28 WebRtcVideoEncoderFactory* video_encoder_factory,
29 WebRtcVideoDecoderFactory* video_decoder_factory) 29 WebRtcVideoDecoderFactory* video_decoder_factory,
30 rtc::TaskQueue* low_priority_worker_queue_)
30 : CompositeMediaEngine<WebRtcVoiceEngine, NullWebRtcVideoEngine>( 31 : CompositeMediaEngine<WebRtcVoiceEngine, NullWebRtcVideoEngine>(
31 adm, 32 adm,
32 audio_encoder_factory, 33 audio_encoder_factory,
33 audio_decoder_factory, 34 audio_decoder_factory,
34 nullptr) { 35 nullptr,
36 low_priority_worker_queue_) {
35 video_.SetExternalDecoderFactory(video_decoder_factory); 37 video_.SetExternalDecoderFactory(video_decoder_factory);
36 video_.SetExternalEncoderFactory(video_encoder_factory); 38 video_.SetExternalEncoderFactory(video_encoder_factory);
37 } 39 }
38 }; 40 };
39 41
40 // Simple test to check if NullWebRtcVideoEngine implements the methods 42 // Simple test to check if NullWebRtcVideoEngine implements the methods
41 // required by CompositeMediaEngine. 43 // required by CompositeMediaEngine.
42 TEST(NullWebRtcVideoEngineTest, CheckInterface) { 44 TEST(NullWebRtcVideoEngineTest, CheckInterface) {
43 WebRtcMediaEngineNullVideo engine( 45 WebRtcMediaEngineNullVideo engine(
44 nullptr, webrtc::MockAudioEncoderFactory::CreateUnusedFactory(), 46 nullptr, webrtc::MockAudioEncoderFactory::CreateUnusedFactory(),
45 webrtc::MockAudioDecoderFactory::CreateUnusedFactory(), nullptr, nullptr); 47 webrtc::MockAudioDecoderFactory::CreateUnusedFactory(), nullptr, nullptr,
48 nullptr);
46 EXPECT_TRUE(engine.Init()); 49 EXPECT_TRUE(engine.Init());
47 } 50 }
48 51
49 } // namespace cricket 52 } // namespace cricket
OLDNEW
« no previous file with comments | « webrtc/media/base/mediaengine.h ('k') | webrtc/media/engine/webrtcmediaengine.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698