diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-12 05:43:14 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-12 05:43:14 +0000 |
commit | 8dd16259287f58f9273002717ec4d27e97127719 (patch) | |
tree | 3863e62a53829a84037444beab3abd4ed9dfc7d0 /third_party/libwebrtc/api/video_codecs/video_decoder_factory.h | |
parent | Releasing progress-linux version 126.0.1-1~progress7.99u1. (diff) | |
download | firefox-8dd16259287f58f9273002717ec4d27e97127719.tar.xz firefox-8dd16259287f58f9273002717ec4d27e97127719.zip |
Merging upstream version 127.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | third_party/libwebrtc/api/video_codecs/video_decoder_factory.h | 31 |
1 files changed, 14 insertions, 17 deletions
diff --git a/third_party/libwebrtc/api/video_codecs/video_decoder_factory.h b/third_party/libwebrtc/api/video_codecs/video_decoder_factory.h index 7e1d2ee883..6048cb27fb 100644 --- a/third_party/libwebrtc/api/video_codecs/video_decoder_factory.h +++ b/third_party/libwebrtc/api/video_codecs/video_decoder_factory.h @@ -12,17 +12,15 @@ #define API_VIDEO_CODECS_VIDEO_DECODER_FACTORY_H_ #include <memory> -#include <string> #include <vector> -#include "absl/types/optional.h" +#include "api/environment/environment.h" #include "api/video_codecs/sdp_video_format.h" +#include "api/video_codecs/video_decoder.h" #include "rtc_base/system/rtc_export.h" namespace webrtc { -class VideoDecoder; - // A factory that creates VideoDecoders. // NOTE: This class is still under development and may change without notice. class RTC_EXPORT VideoDecoderFactory { @@ -32,6 +30,8 @@ class RTC_EXPORT VideoDecoderFactory { bool is_power_efficient = false; }; + virtual ~VideoDecoderFactory() = default; + // Returns a list of supported video formats in order of preference, to use // for signaling etc. virtual std::vector<SdpVideoFormat> GetSupportedFormats() const = 0; @@ -47,21 +47,18 @@ class RTC_EXPORT VideoDecoderFactory { // different scalabilty modes. NOTE: QueryCodecSupport is currently an // experimental feature that is subject to change without notice. virtual CodecSupport QueryCodecSupport(const SdpVideoFormat& format, - bool reference_scaling) const { - // Default implementation, query for supported formats and check if the - // specified format is supported. Returns false if `reference_scaling` is - // true. - CodecSupport codec_support; - codec_support.is_supported = - !reference_scaling && format.IsCodecInList(GetSupportedFormats()); - return codec_support; - } + bool reference_scaling) const; - // Creates a VideoDecoder for the specified format. - virtual std::unique_ptr<VideoDecoder> CreateVideoDecoder( - const SdpVideoFormat& format) = 0; + // Creates a VideoDecoder for the specified `format`. + // TODO: bugs.webrtc.org/15791 - Make pure virtual when implemented in all + // derived classes. + virtual std::unique_ptr<VideoDecoder> Create(const Environment& env, + const SdpVideoFormat& format); - virtual ~VideoDecoderFactory() {} + // TODO: bugs.webrtc.org/15791 - Make private or delete when all callers are + // migrated to `Create`. + virtual std::unique_ptr<VideoDecoder> CreateVideoDecoder( + const SdpVideoFormat& format); }; } // namespace webrtc |