Quellcode-Bibliothek frame_generator_capturer.cc
Sprache: C
/* * Copyright (c) 2013 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.
*/
FrameGeneratorCapturer::~FrameGeneratorCapturer() {
Stop(); // Deconstruct first as tasks in the TaskQueue access other fields of the // instance of this class.
task_queue_ = nullptr;
}
bool FrameGeneratorCapturer::Init() { // This check is added because frame_generator_ might be file based and should // not crash because a file moved. if (frame_generator_.get() == nullptr) returnfalse;
void FrameGeneratorCapturer::InsertFrame() {
MutexLock lock(&lock_); if (sending_) { // TODO(srte): Use more advanced frame rate control to allow arbitrary // fractions. int decimation =
std::round(static_cast<double>(source_fps_) / target_capture_fps_); for (int i = 1; i < decimation; ++i)
frame_generator_->SkipNextFrame();
int FrameGeneratorCapturer::GetCurrentConfiguredFramerate() {
MutexLock lock(&lock_); return target_capture_fps_;
}
} // namespace test
} // namespace webrtc
Messung V0.5
¤ Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.0.9Bemerkung:
(vorverarbeitet)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.