2016-01-26 13:07:54 -08:00
|
|
|
/*
|
2016-02-07 20:46:45 -08:00
|
|
|
* Copyright (c) 2016 The WebRTC project authors. All Rights Reserved.
|
2016-01-26 13:07:54 -08:00
|
|
|
*
|
2016-02-07 20:46:45 -08:00
|
|
|
* Use of this source code is governed by a BSD-style license
|
|
|
|
|
* that can be found in the LICENSE file in the root of the source
|
|
|
|
|
* tree. An additional intellectual property rights grant can be found
|
|
|
|
|
* in the file PATENTS. All contributing project authors may
|
|
|
|
|
* be found in the AUTHORS file in the root of the source tree.
|
2016-01-26 13:07:54 -08:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#include "testing/gtest/include/gtest/gtest.h"
|
|
|
|
|
|
2016-02-12 06:39:40 +01:00
|
|
|
#include "webrtc/media/engine/nullwebrtcvideoengine.h"
|
|
|
|
|
#include "webrtc/media/engine/webrtcvoiceengine.h"
|
2016-01-26 13:07:54 -08:00
|
|
|
|
|
|
|
|
namespace cricket {
|
|
|
|
|
|
|
|
|
|
class WebRtcMediaEngineNullVideo
|
|
|
|
|
: public CompositeMediaEngine<WebRtcVoiceEngine, NullWebRtcVideoEngine> {
|
|
|
|
|
public:
|
|
|
|
|
WebRtcMediaEngineNullVideo(webrtc::AudioDeviceModule* adm,
|
|
|
|
|
WebRtcVideoEncoderFactory* encoder_factory,
|
2016-03-30 23:28:51 -07:00
|
|
|
WebRtcVideoDecoderFactory* decoder_factory)
|
|
|
|
|
: CompositeMediaEngine<WebRtcVoiceEngine, NullWebRtcVideoEngine>(adm) {
|
2016-01-26 13:07:54 -08:00
|
|
|
video_.SetExternalDecoderFactory(decoder_factory);
|
|
|
|
|
video_.SetExternalEncoderFactory(encoder_factory);
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
// Simple test to check if NullWebRtcVideoEngine implements the methods
|
|
|
|
|
// required by CompositeMediaEngine.
|
|
|
|
|
TEST(NullWebRtcVideoEngineTest, CheckInterface) {
|
|
|
|
|
WebRtcMediaEngineNullVideo engine(nullptr, nullptr, nullptr);
|
2016-03-30 23:28:51 -07:00
|
|
|
EXPECT_TRUE(engine.Init());
|
2016-01-26 13:07:54 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
} // namespace cricket
|