mirror of
https://github.com/mollyim/webrtc.git
synced 2025-05-17 07:37:51 +01:00

there's no easy way to inject the Clock in ScreenshareLayers under normal use. To allow faking the clock, rtc::TimeMillis is used instead. Bug: webrtc:10365 Change-Id: I46c7f76514672190a0f0f5816a2c858bc6c76fa4 Reviewed-on: https://webrtc-review.googlesource.com/c/125189 Reviewed-by: Rasmus Brandt <brandtr@webrtc.org> Commit-Queue: Sebastian Jansson <srte@webrtc.org> Cr-Commit-Position: refs/heads/master@{#26946}
31 lines
1.2 KiB
C++
31 lines
1.2 KiB
C++
/*
|
|
* 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.
|
|
*/
|
|
|
|
#include "api/video_codecs/create_vp8_temporal_layers.h"
|
|
#include "absl/memory/memory.h"
|
|
#include "api/video_codecs/vp8_temporal_layers.h"
|
|
#include "modules/video_coding/codecs/vp8/default_temporal_layers.h"
|
|
#include "modules/video_coding/codecs/vp8/screenshare_layers.h"
|
|
|
|
namespace webrtc {
|
|
|
|
std::unique_ptr<Vp8TemporalLayers> CreateVp8TemporalLayers(
|
|
Vp8TemporalLayersType type,
|
|
int num_temporal_layers) {
|
|
switch (type) {
|
|
case Vp8TemporalLayersType::kFixedPattern:
|
|
return absl::make_unique<DefaultTemporalLayers>(num_temporal_layers);
|
|
case Vp8TemporalLayersType::kBitrateDynamic:
|
|
// Conference mode temporal layering for screen content in base stream.
|
|
return absl::make_unique<ScreenshareLayers>(num_temporal_layers);
|
|
}
|
|
}
|
|
|
|
} // namespace webrtc
|