diff --git a/media/BUILD.gn b/media/BUILD.gn index 2a05940b1d..e3cae72d76 100644 --- a/media/BUILD.gn +++ b/media/BUILD.gn @@ -671,7 +671,6 @@ rtc_library("rtc_audio_video") { sources = [ "engine/adm_helpers.cc", "engine/adm_helpers.h", - "engine/null_webrtc_video_engine.h", "engine/payload_type_mapper.cc", "engine/payload_type_mapper.h", "engine/webrtc_media_engine.cc", @@ -1017,7 +1016,6 @@ if (rtc_include_tests) { "base/video_common_unittest.cc", "engine/internal_decoder_factory_unittest.cc", "engine/internal_encoder_factory_unittest.cc", - "engine/null_webrtc_video_engine_unittest.cc", "engine/payload_type_mapper_unittest.cc", "engine/simulcast_encoder_adapter_unittest.cc", "engine/webrtc_media_engine_unittest.cc", diff --git a/media/engine/null_webrtc_video_engine.h b/media/engine/null_webrtc_video_engine.h deleted file mode 100644 index f94cb43e75..0000000000 --- a/media/engine/null_webrtc_video_engine.h +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. - * - * 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. - */ - -#ifndef MEDIA_ENGINE_NULL_WEBRTC_VIDEO_ENGINE_H_ -#define MEDIA_ENGINE_NULL_WEBRTC_VIDEO_ENGINE_H_ - -#include - -#include "media/base/media_channel.h" -#include "media/base/media_engine.h" - -namespace webrtc { - -class Call; - -} // namespace webrtc - -namespace cricket { - -// Video engine implementation that does nothing and can be used in -// CompositeMediaEngine. -class NullWebRtcVideoEngine : public VideoEngineInterface { - public: - std::vector send_codecs(bool) const override { - return std::vector(); - } - - std::vector recv_codecs(bool) const override { - return std::vector(); - } - std::vector send_codecs() const override { - return std::vector(); - } - - std::vector recv_codecs() const override { - return std::vector(); - } - - std::vector GetRtpHeaderExtensions() - const override { - return {}; - } -}; - -} // namespace cricket - -#endif // MEDIA_ENGINE_NULL_WEBRTC_VIDEO_ENGINE_H_ diff --git a/media/engine/null_webrtc_video_engine_unittest.cc b/media/engine/null_webrtc_video_engine_unittest.cc deleted file mode 100644 index 9515d44be9..0000000000 --- a/media/engine/null_webrtc_video_engine_unittest.cc +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. - * - * 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. - */ - -#include "media/engine/null_webrtc_video_engine.h" - -#include -#include - -#include "api/task_queue/default_task_queue_factory.h" -#include "api/task_queue/task_queue_factory.h" -#include "api/transport/field_trial_based_config.h" -#include "media/engine/webrtc_voice_engine.h" -#include "modules/audio_device/include/mock_audio_device.h" -#include "modules/audio_processing/include/audio_processing.h" -#include "test/gtest.h" -#include "test/mock_audio_decoder_factory.h" -#include "test/mock_audio_encoder_factory.h" - -namespace cricket { - -// Simple test to check if NullWebRtcVideoEngine implements the methods -// required by CompositeMediaEngine. -TEST(NullWebRtcVideoEngineTest, CheckInterface) { - std::unique_ptr task_queue_factory = - webrtc::CreateDefaultTaskQueueFactory(); - rtc::scoped_refptr adm = - webrtc::test::MockAudioDeviceModule::CreateNice(); - webrtc::FieldTrialBasedConfig trials; - auto audio_engine = std::make_unique( - task_queue_factory.get(), adm.get(), - webrtc::MockAudioEncoderFactory::CreateUnusedFactory(), - webrtc::MockAudioDecoderFactory::CreateUnusedFactory(), nullptr, - webrtc::AudioProcessingBuilder().Create(), nullptr, trials); - - CompositeMediaEngine engine(std::move(audio_engine), - std::make_unique()); - engine.Init(); -} - -} // namespace cricket