mirror of
https://github.com/mollyim/webrtc.git
synced 2025-05-16 07:10:38 +01:00

This CL paves the way to making FrameBufferController injectable. LibvpxVp8Encoder can manage multiple streams. Prior to this CL, each stream had its own frame buffer controller, all of them held in a vector by LibvpxVp8Encoder. This complicated the code and produced some code duplication (cf. SetupTemporalLayers). This CL: 1. Replaces CreateVp8TemporalLayers() by a factory. (Later CLs will make this factory injectable.) 2. Makes LibvpxVp8Encoder use a single controller. This single controller will, in the case of multiple streams, delegate its work to multiple controllers, but that fact is not visible to LibvpxVp8Encoder. This CL also squashes CL #126046 (Send notifications of RTT and PLR changes to Vp8FrameBufferController) into it. Bug: webrtc:10382 Change-Id: Id9b55734bebb457acc276f34a7a9e52cc19c8eb9 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/126483 Commit-Queue: Elad Alon <eladalon@webrtc.org> Reviewed-by: Erik Språng <sprang@webrtc.org> Cr-Commit-Position: refs/heads/master@{#27206}
30 lines
931 B
C++
30 lines
931 B
C++
/*
|
|
* Copyright (c) 2019 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_CODECS_VP8_TEMPORAL_LAYERS_FACTORY_H_
|
|
#define API_VIDEO_CODECS_VP8_TEMPORAL_LAYERS_FACTORY_H_
|
|
|
|
#include <memory>
|
|
|
|
#include "api/video_codecs/vp8_temporal_layers.h"
|
|
|
|
namespace webrtc {
|
|
|
|
class Vp8TemporalLayersFactory : public Vp8FrameBufferControllerFactory {
|
|
public:
|
|
~Vp8TemporalLayersFactory() override = default;
|
|
|
|
std::unique_ptr<Vp8FrameBufferController> Create(
|
|
const VideoCodec& codec) override;
|
|
};
|
|
|
|
} // namespace webrtc
|
|
|
|
#endif // API_VIDEO_CODECS_VP8_TEMPORAL_LAYERS_FACTORY_H_
|