fork/rust-sdks

git clone https://git.julia.blue/fork/rust-sdks

aoife cassidychore(webrtc-sys): bump to m125_release (#505)a1b926e

main
1.3 KiB39 linesraw
1/*
2 * Copyright 2023 LiveKit
3 *
4 * Licensed under the Apache License, Version 2.0 (the “License”);
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 *     http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an “AS IS” BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17#pragma once
18
19#include "api/video_codecs/video_decoder.h"
20#include "api/video_codecs/video_decoder_factory.h"
21#include "absl/strings/match.h"
22
23namespace livekit {
24class VideoDecoderFactory : public webrtc::VideoDecoderFactory {
25 public:
26  VideoDecoderFactory();
27
28  std::vector<webrtc::SdpVideoFormat> GetSupportedFormats() const override;
29
30  CodecSupport QueryCodecSupport(const webrtc::SdpVideoFormat& format,
31                                 bool reference_scaling) const override;
32
33  std::unique_ptr<webrtc::VideoDecoder> Create(
34      const webrtc::Environment& env, const webrtc::SdpVideoFormat& format) override;
35
36 private:
37  std::vector<std::unique_ptr<webrtc::VideoDecoderFactory>> factories_;
38};
39}  // namespace livekit