blob: c622af555e41d47f30d19e44e7cdff0c47de9a0e [file] [log] [blame]
Emircan Uysaler0a375472017-12-11 12:21:02 +05301/*
2 * Copyright (c) 2017 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
Emircan Uysalerd7ae3c32018-01-25 13:01:09 -080011#ifndef MEDIA_ENGINE_MULTIPLEXCODECFACTORY_H_
12#define MEDIA_ENGINE_MULTIPLEXCODECFACTORY_H_
Emircan Uysaler0a375472017-12-11 12:21:02 +053013
14#include <memory>
15#include <vector>
16
17#include "api/video_codecs/video_decoder_factory.h"
18#include "api/video_codecs/video_encoder_factory.h"
19
20namespace webrtc {
21
Emircan Uysalerd7ae3c32018-01-25 13:01:09 -080022class MultiplexEncoderFactory : public VideoEncoderFactory {
Emircan Uysaler0a375472017-12-11 12:21:02 +053023 public:
Emircan Uysalerd7ae3c32018-01-25 13:01:09 -080024 explicit MultiplexEncoderFactory(
25 std::unique_ptr<VideoEncoderFactory> factory);
Emircan Uysaler0a375472017-12-11 12:21:02 +053026
27 std::vector<SdpVideoFormat> GetSupportedFormats() const override;
28 CodecInfo QueryVideoEncoder(const SdpVideoFormat& format) const override;
29 std::unique_ptr<VideoEncoder> CreateVideoEncoder(
30 const SdpVideoFormat& format) override;
31
32 private:
33 std::unique_ptr<VideoEncoderFactory> factory_;
34};
35
Emircan Uysalerd7ae3c32018-01-25 13:01:09 -080036class MultiplexDecoderFactory : public VideoDecoderFactory {
Emircan Uysaler0a375472017-12-11 12:21:02 +053037 public:
Emircan Uysalerd7ae3c32018-01-25 13:01:09 -080038 explicit MultiplexDecoderFactory(
39 std::unique_ptr<VideoDecoderFactory> factory);
Emircan Uysaler0a375472017-12-11 12:21:02 +053040
41 std::vector<SdpVideoFormat> GetSupportedFormats() const override;
42 std::unique_ptr<VideoDecoder> CreateVideoDecoder(
43 const SdpVideoFormat& format) override;
44
45 private:
46 std::unique_ptr<VideoDecoderFactory> factory_;
47};
48
49} // namespace webrtc
50
Emircan Uysalerd7ae3c32018-01-25 13:01:09 -080051#endif // MEDIA_ENGINE_MULTIPLEXCODECFACTORY_H_