webrtc/media/engine/null_webrtc_video_engine.h
Jonas Oreland a3aa9bd75b Make VideoBitrateAllocatorFactory injectable.
This patch makes VideoBitrateAllocatorFactory injectable
by adding to PeerConnectionDependencies instead of allowing it to be
overridden using MediaEngine (on PeerConnectionFactory).

With this patch VideoBitrateAllocatorFactory is owned
by the PeerConnection.

WANT_LGTM (examples) : sakal@
WANT_LGTM (api/pc) : steveanton@

Bug: webrtc:10547
Change-Id: I768d400a621f2b7a98795eb7f410adb48651bfd6
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/132706
Commit-Queue: Jonas Oreland <jonaso@webrtc.org>
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27654}
2019-04-17 06:17:34 +00:00

52 lines
1.4 KiB
C++

/*
* 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 <vector>
#include "media/base/media_channel.h"
#include "media/base/media_engine.h"
namespace webrtc {
class Call;
} // namespace webrtc
namespace cricket {
class VideoMediaChannel;
// Video engine implementation that does nothing and can be used in
// CompositeMediaEngine.
class NullWebRtcVideoEngine : public VideoEngineInterface {
public:
std::vector<VideoCodec> codecs() const override {
return std::vector<VideoCodec>();
}
RtpCapabilities GetCapabilities() const override { return RtpCapabilities(); }
VideoMediaChannel* CreateMediaChannel(
webrtc::Call* call,
const MediaConfig& config,
const VideoOptions& options,
const webrtc::CryptoOptions& crypto_options,
webrtc::VideoBitrateAllocatorFactory* video_bitrate_allocator_factory)
override {
return nullptr;
}
};
} // namespace cricket
#endif // MEDIA_ENGINE_NULL_WEBRTC_VIDEO_ENGINE_H_