mirror of
https://github.com/mollyim/webrtc.git
synced 2025-05-13 13:50:40 +01:00

Also renaming it Vp8TemporalLayers to show that it is codec specific. Bug: webrtc:9012 Change-Id: I18187538b8142cdd7538f1a4ed1bada09d040f1f Reviewed-on: https://webrtc-review.googlesource.com/c/104643 Commit-Queue: Erik Språng <sprang@webrtc.org> Reviewed-by: Per Kjellander <perkj@webrtc.org> Reviewed-by: Sebastian Jansson <srte@webrtc.org> Reviewed-by: Niels Moller <nisse@webrtc.org> Cr-Commit-Position: refs/heads/master@{#25137}
33 lines
1.3 KiB
C++
33 lines
1.3 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"
|
|
#include "system_wrappers/include/clock.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,
|
|
Clock::GetRealTimeClock());
|
|
}
|
|
}
|
|
|
|
} // namespace webrtc
|