vp8.h 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. /*
  2. * Copyright (c) 2012 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 MODULES_VIDEO_CODING_CODECS_VP8_INCLUDE_VP8_H_
  11. #define MODULES_VIDEO_CODING_CODECS_VP8_INCLUDE_VP8_H_
  12. #include <memory>
  13. #include <vector>
  14. #include "api/video_codecs/video_encoder.h"
  15. #include "api/video_codecs/vp8_frame_buffer_controller.h"
  16. #include "modules/video_coding/include/video_codec_interface.h"
  17. #include "rtc_base/deprecation.h"
  18. namespace webrtc {
  19. // TODO(brandtr): Move these interfaces to the api/ folder.
  20. class VP8Encoder {
  21. public:
  22. struct Settings {
  23. // Allows for overriding the Vp8FrameBufferController used by the encoder.
  24. // If unset, a default Vp8FrameBufferController will be instantiated
  25. // internally.
  26. std::unique_ptr<Vp8FrameBufferControllerFactory>
  27. frame_buffer_controller_factory = nullptr;
  28. // Allows for overriding the resolution/bitrate limits exposed through
  29. // VideoEncoder::GetEncoderInfo(). No override is done if empty.
  30. std::vector<VideoEncoder::ResolutionBitrateLimits>
  31. resolution_bitrate_limits = {};
  32. };
  33. static std::unique_ptr<VideoEncoder> Create();
  34. static std::unique_ptr<VideoEncoder> Create(Settings settings);
  35. RTC_DEPRECATED static std::unique_ptr<VideoEncoder> Create(
  36. std::unique_ptr<Vp8FrameBufferControllerFactory>
  37. frame_buffer_controller_factory);
  38. };
  39. class VP8Decoder {
  40. public:
  41. static std::unique_ptr<VideoDecoder> Create();
  42. };
  43. } // namespace webrtc
  44. #endif // MODULES_VIDEO_CODING_CODECS_VP8_INCLUDE_VP8_H_