/* * Copyright (c) 2020 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.
*/
rtc::scoped_refptr<VideoFrameBuffer>
MappableNativeBuffer::ScaledBuffer::CropAndScale(int offset_x, int offset_y, int crop_width, int crop_height, int scaled_width, int scaled_height) { return rtc::make_ref_counted<ScaledBuffer>(parent_, scaled_width,
scaled_height);
}
MappableNativeBuffer::MappableNativeBuffer(VideoFrameBuffer::Type mappable_type, int width, int height)
: mappable_type_(mappable_type), width_(width), height_(height) {
RTC_DCHECK(mappable_type_ == VideoFrameBuffer::Type::kI420 ||
mappable_type_ == VideoFrameBuffer::Type::kNV12);
}
MappableNativeBuffer::~MappableNativeBuffer() {}
rtc::scoped_refptr<VideoFrameBuffer> MappableNativeBuffer::CropAndScale( int offset_x, int offset_y, int crop_width, int crop_height, int scaled_width, int scaled_height) { return FullSizeBuffer()->CropAndScale(
offset_x, offset_y, crop_width, crop_height, scaled_width, scaled_height);
}
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.