null_webrtc_video_engine.h 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. /*
  2. * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved.
  3. *
  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
  6. * tree. An additional intellectual property rights grant can be found
  7. * in the file PATENTS. All contributing project authors may
  8. * be found in the AUTHORS file in the root of the source tree.
  9. */
  10. #ifndef MEDIA_ENGINE_NULL_WEBRTC_VIDEO_ENGINE_H_
  11. #define MEDIA_ENGINE_NULL_WEBRTC_VIDEO_ENGINE_H_
  12. #include <vector>
  13. #include "media/base/media_channel.h"
  14. #include "media/base/media_engine.h"
  15. namespace webrtc {
  16. class Call;
  17. } // namespace webrtc
  18. namespace cricket {
  19. class VideoMediaChannel;
  20. // Video engine implementation that does nothing and can be used in
  21. // CompositeMediaEngine.
  22. class NullWebRtcVideoEngine : public VideoEngineInterface {
  23. public:
  24. std::vector<VideoCodec> send_codecs() const override {
  25. return std::vector<VideoCodec>();
  26. }
  27. std::vector<VideoCodec> recv_codecs() const override {
  28. return std::vector<VideoCodec>();
  29. }
  30. std::vector<webrtc::RtpHeaderExtensionCapability> GetRtpHeaderExtensions()
  31. const override {
  32. return {};
  33. }
  34. VideoMediaChannel* CreateMediaChannel(
  35. webrtc::Call* call,
  36. const MediaConfig& config,
  37. const VideoOptions& options,
  38. const webrtc::CryptoOptions& crypto_options,
  39. webrtc::VideoBitrateAllocatorFactory* video_bitrate_allocator_factory)
  40. override {
  41. return nullptr;
  42. }
  43. };
  44. } // namespace cricket
  45. #endif // MEDIA_ENGINE_NULL_WEBRTC_VIDEO_ENGINE_H_