Video bitrate allocator factory interface for custom video bitrate allocator
Bug: webrtc:9513 Change-Id: If5719f4f71a2a9e44b2aaa0b592d3921b68ba5d9 Reviewed-on: https://webrtc-review.googlesource.com/92280 Reviewed-by: Erik Språng <sprang@webrtc.org> Reviewed-by: Per Kjellander <perkj@webrtc.org> Commit-Queue: Jiawei Ou <ouj@fb.com> Cr-Commit-Position: refs/heads/master@{#24279}
This commit is contained in:
@ -101,6 +101,17 @@ rtc_source_set("video_bitrate_allocator") {
|
||||
]
|
||||
}
|
||||
|
||||
rtc_source_set("video_bitrate_allocator_factory") {
|
||||
visibility = [ "*" ]
|
||||
sources = [
|
||||
"video_bitrate_allocator_factory.h",
|
||||
]
|
||||
deps = [
|
||||
":video_bitrate_allocator",
|
||||
"../../media:rtc_media_base",
|
||||
]
|
||||
}
|
||||
|
||||
rtc_source_set("video_stream_decoder") {
|
||||
visibility = [ "*" ]
|
||||
sources = [
|
||||
|
32
api/video/video_bitrate_allocator_factory.h
Normal file
32
api/video/video_bitrate_allocator_factory.h
Normal file
@ -0,0 +1,32 @@
|
||||
/*
|
||||
* Copyright (c) 2018 The WebRTC project authors. All Rights Reserved.
|
||||
*
|
||||
* Use of this source code is governed by a BSD-style license
|
||||
* that can be found in the LICENSE file in the root of the source
|
||||
* tree. An additional intellectual property rights grant can be found
|
||||
* in the file PATENTS. All contributing project authors may
|
||||
* be found in the AUTHORS file in the root of the source tree.
|
||||
*/
|
||||
|
||||
#ifndef API_VIDEO_VIDEO_BITRATE_ALLOCATOR_FACTORY_H_
|
||||
#define API_VIDEO_VIDEO_BITRATE_ALLOCATOR_FACTORY_H_
|
||||
|
||||
#include <memory>
|
||||
#include "api/video/video_bitrate_allocator.h"
|
||||
#include "media/base/codec.h"
|
||||
|
||||
namespace webrtc {
|
||||
|
||||
// A factory that creates VideoBitrateAllocator.
|
||||
// NOTE: This class is still under development and may change without notice.
|
||||
class VideoBitrateAllocatorFactory {
|
||||
public:
|
||||
virtual ~VideoBitrateAllocatorFactory() = default;
|
||||
// Creates a VideoBitrateAllocator for a specific video codec.
|
||||
virtual std::unique_ptr<VideoBitrateAllocator> CreateVideoBitrateAllocator(
|
||||
const VideoCodec& codec) = 0;
|
||||
};
|
||||
|
||||
} // namespace webrtc
|
||||
|
||||
#endif // API_VIDEO_VIDEO_BITRATE_ALLOCATOR_FACTORY_H_
|
Reference in New Issue
Block a user