/* * 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.
*/
// Semi-immutable structure to hold information about packets used to assemble // an audio or video frame. Uses internal reference counting to make it very // cheap to copy. // // We should ideally just use `std::vector<RtpPacketInfo>` and have it // `std::move()`-ed as the per-packet information is transferred from one object // to another. But moving the info, instead of copying it, is not easily done // for the current video code. class RTC_EXPORT RtpPacketInfos { public: using vector_type = std::vector<RtpPacketInfo>;
using value_type = vector_type::value_type; using size_type = vector_type::size_type; using difference_type = vector_type::difference_type; using const_reference = vector_type::const_reference; using const_pointer = vector_type::const_pointer; using const_iterator = vector_type::const_iterator; using const_reverse_iterator = vector_type::const_reverse_iterator;
using reference = const_reference; using pointer = const_pointer; using iterator = const_iterator; using reverse_iterator = const_reverse_iterator;
private: class Data final : public rtc::RefCountedNonVirtual<Data> { public: static rtc::scoped_refptr<Data> Create(const vector_type& entries) { // Performance optimization for the empty case. if (entries.empty()) { return nullptr;
}
return rtc::make_ref_counted<Data>(entries);
}
static rtc::scoped_refptr<Data> Create(vector_type&& entries) { // Performance optimization for the empty case. if (entries.empty()) { return nullptr;
}
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.