mirror of
https://github.com/mollyim/webrtc.git
synced 2025-05-13 05:40:42 +01:00
Cleanup modules_common_types
Uninline RTPFragmentaion functions fix RTPFragmentation move constructor and assign operators (was recursive for win) replace assert with rtc::dchecked_cast Remove unused includes and dependencies. Fix other targets that used those includes transitively instead of directly Bug: None Change-Id: I647cb1eda107dc7d87d25234095545bc2842fa40 Reviewed-on: https://webrtc-review.googlesource.com/100500 Commit-Queue: Danil Chapovalov <danilchap@webrtc.org> Reviewed-by: Karl Wiberg <kwiberg@webrtc.org> Cr-Commit-Position: refs/heads/master@{#24759}
This commit is contained in:
parent
6d800030ab
commit
db1285676b
17 changed files with 194 additions and 155 deletions
|
@ -116,8 +116,6 @@ class TransportFeedbackPacketLossTrackerTest
|
||||||
|
|
||||||
private:
|
private:
|
||||||
int64_t time_ms_{0};
|
int64_t time_ms_{0};
|
||||||
|
|
||||||
RTC_DISALLOW_COPY_AND_ASSIGN(TransportFeedbackPacketLossTrackerTest);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|
|
@ -44,6 +44,7 @@ rtc_source_set("module_api") {
|
||||||
visibility = [ "*" ]
|
visibility = [ "*" ]
|
||||||
sources = [
|
sources = [
|
||||||
"include/module.h",
|
"include/module.h",
|
||||||
|
"include/module_common_types.cc",
|
||||||
"include/module_common_types.h",
|
"include/module_common_types.h",
|
||||||
]
|
]
|
||||||
deps = [
|
deps = [
|
||||||
|
@ -51,14 +52,8 @@ rtc_source_set("module_api") {
|
||||||
":module_fec_api",
|
":module_fec_api",
|
||||||
"..:webrtc_common",
|
"..:webrtc_common",
|
||||||
"../api:libjingle_peerconnection_api",
|
"../api:libjingle_peerconnection_api",
|
||||||
"../api/transport:network_control",
|
|
||||||
"../api/video:video_frame",
|
|
||||||
"../api/video:video_frame_i420",
|
|
||||||
"../modules/rtp_rtcp:rtp_video_header",
|
"../modules/rtp_rtcp:rtp_video_header",
|
||||||
"../rtc_base:deprecation",
|
"../rtc_base:safe_conversions",
|
||||||
"../rtc_base:rtc_base_approved",
|
|
||||||
"video_coding:codec_globals_headers",
|
|
||||||
"//third_party/abseil-cpp/absl/types:optional",
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -27,6 +27,7 @@
|
||||||
#include "modules/audio_coding/codecs/audio_format_conversion.h"
|
#include "modules/audio_coding/codecs/audio_format_conversion.h"
|
||||||
#include "modules/audio_coding/test/utility.h"
|
#include "modules/audio_coding/test/utility.h"
|
||||||
#include "rtc_base/strings/string_builder.h"
|
#include "rtc_base/strings/string_builder.h"
|
||||||
|
#include "rtc_base/timeutils.h"
|
||||||
#include "system_wrappers/include/sleep.h"
|
#include "system_wrappers/include/sleep.h"
|
||||||
#include "test/testsupport/fileutils.h"
|
#include "test/testsupport/fileutils.h"
|
||||||
|
|
||||||
|
|
|
@ -70,6 +70,7 @@ rtc_static_library("transport_feedback") {
|
||||||
]
|
]
|
||||||
|
|
||||||
deps = [
|
deps = [
|
||||||
|
"../../api/transport:network_control",
|
||||||
"../../modules:module_api",
|
"../../modules:module_api",
|
||||||
"../../rtc_base:checks",
|
"../../rtc_base:checks",
|
||||||
"../../rtc_base:rtc_base_approved",
|
"../../rtc_base:rtc_base_approved",
|
||||||
|
|
|
@ -70,6 +70,7 @@ rtc_static_library("transport_feedback") {
|
||||||
|
|
||||||
deps = [
|
deps = [
|
||||||
"../..:module_api",
|
"../..:module_api",
|
||||||
|
"../../../api/transport:network_control",
|
||||||
"../../../rtc_base:checks",
|
"../../../rtc_base:checks",
|
||||||
"../../../rtc_base:rtc_base_approved",
|
"../../../rtc_base:rtc_base_approved",
|
||||||
"../../../system_wrappers",
|
"../../../system_wrappers",
|
||||||
|
|
|
@ -14,6 +14,7 @@
|
||||||
#include <deque>
|
#include <deque>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
|
#include "api/transport/network_types.h"
|
||||||
#include "modules/congestion_controller/rtp/send_time_history.h"
|
#include "modules/congestion_controller/rtp/send_time_history.h"
|
||||||
#include "rtc_base/criticalsection.h"
|
#include "rtc_base/criticalsection.h"
|
||||||
#include "rtc_base/thread_annotations.h"
|
#include "rtc_base/thread_annotations.h"
|
||||||
|
|
|
@ -14,6 +14,7 @@
|
||||||
#include <deque>
|
#include <deque>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
|
#include "api/transport/network_types.h"
|
||||||
#include "modules/congestion_controller/rtp/send_time_history.h"
|
#include "modules/congestion_controller/rtp/send_time_history.h"
|
||||||
#include "rtc_base/criticalsection.h"
|
#include "rtc_base/criticalsection.h"
|
||||||
#include "rtc_base/thread_annotations.h"
|
#include "rtc_base/thread_annotations.h"
|
||||||
|
|
159
modules/include/module_common_types.cc
Normal file
159
modules/include/module_common_types.cc
Normal file
|
@ -0,0 +1,159 @@
|
||||||
|
/*
|
||||||
|
* 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 "modules/include/module_common_types.h"
|
||||||
|
|
||||||
|
#include <string.h>
|
||||||
|
#include <utility>
|
||||||
|
|
||||||
|
#include "rtc_base/numerics/safe_conversions.h"
|
||||||
|
|
||||||
|
namespace webrtc {
|
||||||
|
|
||||||
|
RTPFragmentationHeader::RTPFragmentationHeader()
|
||||||
|
: fragmentationVectorSize(0),
|
||||||
|
fragmentationOffset(nullptr),
|
||||||
|
fragmentationLength(nullptr),
|
||||||
|
fragmentationTimeDiff(nullptr),
|
||||||
|
fragmentationPlType(nullptr) {}
|
||||||
|
|
||||||
|
RTPFragmentationHeader::RTPFragmentationHeader(RTPFragmentationHeader&& other)
|
||||||
|
: RTPFragmentationHeader() {
|
||||||
|
swap(*this, other);
|
||||||
|
}
|
||||||
|
|
||||||
|
RTPFragmentationHeader& RTPFragmentationHeader::operator=(
|
||||||
|
RTPFragmentationHeader&& other) {
|
||||||
|
swap(*this, other);
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
|
|
||||||
|
RTPFragmentationHeader::~RTPFragmentationHeader() {
|
||||||
|
delete[] fragmentationOffset;
|
||||||
|
delete[] fragmentationLength;
|
||||||
|
delete[] fragmentationTimeDiff;
|
||||||
|
delete[] fragmentationPlType;
|
||||||
|
}
|
||||||
|
|
||||||
|
void swap(RTPFragmentationHeader& a, RTPFragmentationHeader& b) {
|
||||||
|
using std::swap;
|
||||||
|
swap(a.fragmentationVectorSize, b.fragmentationVectorSize);
|
||||||
|
swap(a.fragmentationOffset, b.fragmentationOffset);
|
||||||
|
swap(a.fragmentationLength, b.fragmentationLength);
|
||||||
|
swap(a.fragmentationTimeDiff, b.fragmentationTimeDiff);
|
||||||
|
swap(a.fragmentationPlType, b.fragmentationPlType);
|
||||||
|
}
|
||||||
|
|
||||||
|
void RTPFragmentationHeader::CopyFrom(const RTPFragmentationHeader& src) {
|
||||||
|
if (this == &src) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (src.fragmentationVectorSize != fragmentationVectorSize) {
|
||||||
|
// new size of vectors
|
||||||
|
|
||||||
|
// delete old
|
||||||
|
delete[] fragmentationOffset;
|
||||||
|
fragmentationOffset = nullptr;
|
||||||
|
delete[] fragmentationLength;
|
||||||
|
fragmentationLength = nullptr;
|
||||||
|
delete[] fragmentationTimeDiff;
|
||||||
|
fragmentationTimeDiff = nullptr;
|
||||||
|
delete[] fragmentationPlType;
|
||||||
|
fragmentationPlType = nullptr;
|
||||||
|
|
||||||
|
if (src.fragmentationVectorSize > 0) {
|
||||||
|
// allocate new
|
||||||
|
if (src.fragmentationOffset) {
|
||||||
|
fragmentationOffset = new size_t[src.fragmentationVectorSize];
|
||||||
|
}
|
||||||
|
if (src.fragmentationLength) {
|
||||||
|
fragmentationLength = new size_t[src.fragmentationVectorSize];
|
||||||
|
}
|
||||||
|
if (src.fragmentationTimeDiff) {
|
||||||
|
fragmentationTimeDiff = new uint16_t[src.fragmentationVectorSize];
|
||||||
|
}
|
||||||
|
if (src.fragmentationPlType) {
|
||||||
|
fragmentationPlType = new uint8_t[src.fragmentationVectorSize];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// set new size
|
||||||
|
fragmentationVectorSize = src.fragmentationVectorSize;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (src.fragmentationVectorSize > 0) {
|
||||||
|
// copy values
|
||||||
|
if (src.fragmentationOffset) {
|
||||||
|
memcpy(fragmentationOffset, src.fragmentationOffset,
|
||||||
|
src.fragmentationVectorSize * sizeof(size_t));
|
||||||
|
}
|
||||||
|
if (src.fragmentationLength) {
|
||||||
|
memcpy(fragmentationLength, src.fragmentationLength,
|
||||||
|
src.fragmentationVectorSize * sizeof(size_t));
|
||||||
|
}
|
||||||
|
if (src.fragmentationTimeDiff) {
|
||||||
|
memcpy(fragmentationTimeDiff, src.fragmentationTimeDiff,
|
||||||
|
src.fragmentationVectorSize * sizeof(uint16_t));
|
||||||
|
}
|
||||||
|
if (src.fragmentationPlType) {
|
||||||
|
memcpy(fragmentationPlType, src.fragmentationPlType,
|
||||||
|
src.fragmentationVectorSize * sizeof(uint8_t));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void RTPFragmentationHeader::Resize(size_t size) {
|
||||||
|
const uint16_t size16 = rtc::dchecked_cast<uint16_t>(size);
|
||||||
|
if (fragmentationVectorSize < size16) {
|
||||||
|
uint16_t oldVectorSize = fragmentationVectorSize;
|
||||||
|
{
|
||||||
|
// offset
|
||||||
|
size_t* oldOffsets = fragmentationOffset;
|
||||||
|
fragmentationOffset = new size_t[size16];
|
||||||
|
memset(fragmentationOffset + oldVectorSize, 0,
|
||||||
|
sizeof(size_t) * (size16 - oldVectorSize));
|
||||||
|
// copy old values
|
||||||
|
memcpy(fragmentationOffset, oldOffsets, sizeof(size_t) * oldVectorSize);
|
||||||
|
delete[] oldOffsets;
|
||||||
|
}
|
||||||
|
// length
|
||||||
|
{
|
||||||
|
size_t* oldLengths = fragmentationLength;
|
||||||
|
fragmentationLength = new size_t[size16];
|
||||||
|
memset(fragmentationLength + oldVectorSize, 0,
|
||||||
|
sizeof(size_t) * (size16 - oldVectorSize));
|
||||||
|
memcpy(fragmentationLength, oldLengths, sizeof(size_t) * oldVectorSize);
|
||||||
|
delete[] oldLengths;
|
||||||
|
}
|
||||||
|
// time diff
|
||||||
|
{
|
||||||
|
uint16_t* oldTimeDiffs = fragmentationTimeDiff;
|
||||||
|
fragmentationTimeDiff = new uint16_t[size16];
|
||||||
|
memset(fragmentationTimeDiff + oldVectorSize, 0,
|
||||||
|
sizeof(uint16_t) * (size16 - oldVectorSize));
|
||||||
|
memcpy(fragmentationTimeDiff, oldTimeDiffs,
|
||||||
|
sizeof(uint16_t) * oldVectorSize);
|
||||||
|
delete[] oldTimeDiffs;
|
||||||
|
}
|
||||||
|
// payload type
|
||||||
|
{
|
||||||
|
uint8_t* oldTimePlTypes = fragmentationPlType;
|
||||||
|
fragmentationPlType = new uint8_t[size16];
|
||||||
|
memset(fragmentationPlType + oldVectorSize, 0,
|
||||||
|
sizeof(uint8_t) * (size16 - oldVectorSize));
|
||||||
|
memcpy(fragmentationPlType, oldTimePlTypes,
|
||||||
|
sizeof(uint8_t) * oldVectorSize);
|
||||||
|
delete[] oldTimePlTypes;
|
||||||
|
}
|
||||||
|
fragmentationVectorSize = size16;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
} // namespace webrtc
|
|
@ -11,24 +11,14 @@
|
||||||
#ifndef MODULES_INCLUDE_MODULE_COMMON_TYPES_H_
|
#ifndef MODULES_INCLUDE_MODULE_COMMON_TYPES_H_
|
||||||
#define MODULES_INCLUDE_MODULE_COMMON_TYPES_H_
|
#define MODULES_INCLUDE_MODULE_COMMON_TYPES_H_
|
||||||
|
|
||||||
#include <assert.h>
|
#include <stddef.h>
|
||||||
#include <string.h> // memcpy
|
#include <stdint.h>
|
||||||
|
|
||||||
#include <algorithm>
|
|
||||||
#include <limits>
|
|
||||||
|
|
||||||
#include "absl/types/optional.h"
|
|
||||||
#include "api/rtp_headers.h"
|
#include "api/rtp_headers.h"
|
||||||
#include "api/transport/network_types.h"
|
|
||||||
#include "api/video/video_rotation.h"
|
|
||||||
#include "common_types.h" // NOLINT(build/include)
|
#include "common_types.h" // NOLINT(build/include)
|
||||||
#include "modules/include/module_common_types_public.h"
|
#include "modules/include/module_common_types_public.h"
|
||||||
#include "modules/include/module_fec_types.h"
|
#include "modules/include/module_fec_types.h"
|
||||||
#include "modules/rtp_rtcp/source/rtp_video_header.h"
|
#include "modules/rtp_rtcp/source/rtp_video_header.h"
|
||||||
#include "rtc_base/constructormagic.h"
|
|
||||||
#include "rtc_base/deprecation.h"
|
|
||||||
#include "rtc_base/numerics/safe_conversions.h"
|
|
||||||
#include "rtc_base/timeutils.h"
|
|
||||||
|
|
||||||
namespace webrtc {
|
namespace webrtc {
|
||||||
|
|
||||||
|
@ -45,142 +35,29 @@ struct WebRtcRTPHeader {
|
||||||
|
|
||||||
class RTPFragmentationHeader {
|
class RTPFragmentationHeader {
|
||||||
public:
|
public:
|
||||||
RTPFragmentationHeader()
|
RTPFragmentationHeader();
|
||||||
: fragmentationVectorSize(0),
|
RTPFragmentationHeader(const RTPFragmentationHeader&) = delete;
|
||||||
fragmentationOffset(NULL),
|
RTPFragmentationHeader(RTPFragmentationHeader&& other);
|
||||||
fragmentationLength(NULL),
|
RTPFragmentationHeader& operator=(const RTPFragmentationHeader& other) =
|
||||||
fragmentationTimeDiff(NULL),
|
delete;
|
||||||
fragmentationPlType(NULL) {}
|
RTPFragmentationHeader& operator=(RTPFragmentationHeader&& other);
|
||||||
|
~RTPFragmentationHeader();
|
||||||
|
|
||||||
RTPFragmentationHeader(RTPFragmentationHeader&& other)
|
friend void swap(RTPFragmentationHeader& a, RTPFragmentationHeader& b);
|
||||||
: RTPFragmentationHeader() {
|
|
||||||
std::swap(*this, other);
|
|
||||||
}
|
|
||||||
|
|
||||||
~RTPFragmentationHeader() {
|
void CopyFrom(const RTPFragmentationHeader& src);
|
||||||
delete[] fragmentationOffset;
|
void VerifyAndAllocateFragmentationHeader(size_t size) { Resize(size); }
|
||||||
delete[] fragmentationLength;
|
|
||||||
delete[] fragmentationTimeDiff;
|
|
||||||
delete[] fragmentationPlType;
|
|
||||||
}
|
|
||||||
|
|
||||||
void operator=(RTPFragmentationHeader&& other) { std::swap(*this, other); }
|
void Resize(size_t size);
|
||||||
|
size_t Size() const { return fragmentationVectorSize; }
|
||||||
|
|
||||||
friend void swap(RTPFragmentationHeader& a, RTPFragmentationHeader& b) {
|
size_t Offset(size_t index) const { return fragmentationOffset[index]; }
|
||||||
using std::swap;
|
size_t Length(size_t index) const { return fragmentationLength[index]; }
|
||||||
swap(a.fragmentationVectorSize, b.fragmentationVectorSize);
|
uint16_t TimeDiff(size_t index) const { return fragmentationTimeDiff[index]; }
|
||||||
swap(a.fragmentationOffset, b.fragmentationOffset);
|
int PayloadType(size_t index) const { return fragmentationPlType[index]; }
|
||||||
swap(a.fragmentationLength, b.fragmentationLength);
|
|
||||||
swap(a.fragmentationTimeDiff, b.fragmentationTimeDiff);
|
|
||||||
swap(a.fragmentationPlType, b.fragmentationPlType);
|
|
||||||
}
|
|
||||||
|
|
||||||
void CopyFrom(const RTPFragmentationHeader& src) {
|
|
||||||
if (this == &src) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (src.fragmentationVectorSize != fragmentationVectorSize) {
|
|
||||||
// new size of vectors
|
|
||||||
|
|
||||||
// delete old
|
|
||||||
delete[] fragmentationOffset;
|
|
||||||
fragmentationOffset = NULL;
|
|
||||||
delete[] fragmentationLength;
|
|
||||||
fragmentationLength = NULL;
|
|
||||||
delete[] fragmentationTimeDiff;
|
|
||||||
fragmentationTimeDiff = NULL;
|
|
||||||
delete[] fragmentationPlType;
|
|
||||||
fragmentationPlType = NULL;
|
|
||||||
|
|
||||||
if (src.fragmentationVectorSize > 0) {
|
|
||||||
// allocate new
|
|
||||||
if (src.fragmentationOffset) {
|
|
||||||
fragmentationOffset = new size_t[src.fragmentationVectorSize];
|
|
||||||
}
|
|
||||||
if (src.fragmentationLength) {
|
|
||||||
fragmentationLength = new size_t[src.fragmentationVectorSize];
|
|
||||||
}
|
|
||||||
if (src.fragmentationTimeDiff) {
|
|
||||||
fragmentationTimeDiff = new uint16_t[src.fragmentationVectorSize];
|
|
||||||
}
|
|
||||||
if (src.fragmentationPlType) {
|
|
||||||
fragmentationPlType = new uint8_t[src.fragmentationVectorSize];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// set new size
|
|
||||||
fragmentationVectorSize = src.fragmentationVectorSize;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (src.fragmentationVectorSize > 0) {
|
|
||||||
// copy values
|
|
||||||
if (src.fragmentationOffset) {
|
|
||||||
memcpy(fragmentationOffset, src.fragmentationOffset,
|
|
||||||
src.fragmentationVectorSize * sizeof(size_t));
|
|
||||||
}
|
|
||||||
if (src.fragmentationLength) {
|
|
||||||
memcpy(fragmentationLength, src.fragmentationLength,
|
|
||||||
src.fragmentationVectorSize * sizeof(size_t));
|
|
||||||
}
|
|
||||||
if (src.fragmentationTimeDiff) {
|
|
||||||
memcpy(fragmentationTimeDiff, src.fragmentationTimeDiff,
|
|
||||||
src.fragmentationVectorSize * sizeof(uint16_t));
|
|
||||||
}
|
|
||||||
if (src.fragmentationPlType) {
|
|
||||||
memcpy(fragmentationPlType, src.fragmentationPlType,
|
|
||||||
src.fragmentationVectorSize * sizeof(uint8_t));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void VerifyAndAllocateFragmentationHeader(const size_t size) {
|
|
||||||
assert(size <= std::numeric_limits<uint16_t>::max());
|
|
||||||
const uint16_t size16 = static_cast<uint16_t>(size);
|
|
||||||
if (fragmentationVectorSize < size16) {
|
|
||||||
uint16_t oldVectorSize = fragmentationVectorSize;
|
|
||||||
{
|
|
||||||
// offset
|
|
||||||
size_t* oldOffsets = fragmentationOffset;
|
|
||||||
fragmentationOffset = new size_t[size16];
|
|
||||||
memset(fragmentationOffset + oldVectorSize, 0,
|
|
||||||
sizeof(size_t) * (size16 - oldVectorSize));
|
|
||||||
// copy old values
|
|
||||||
memcpy(fragmentationOffset, oldOffsets, sizeof(size_t) * oldVectorSize);
|
|
||||||
delete[] oldOffsets;
|
|
||||||
}
|
|
||||||
// length
|
|
||||||
{
|
|
||||||
size_t* oldLengths = fragmentationLength;
|
|
||||||
fragmentationLength = new size_t[size16];
|
|
||||||
memset(fragmentationLength + oldVectorSize, 0,
|
|
||||||
sizeof(size_t) * (size16 - oldVectorSize));
|
|
||||||
memcpy(fragmentationLength, oldLengths, sizeof(size_t) * oldVectorSize);
|
|
||||||
delete[] oldLengths;
|
|
||||||
}
|
|
||||||
// time diff
|
|
||||||
{
|
|
||||||
uint16_t* oldTimeDiffs = fragmentationTimeDiff;
|
|
||||||
fragmentationTimeDiff = new uint16_t[size16];
|
|
||||||
memset(fragmentationTimeDiff + oldVectorSize, 0,
|
|
||||||
sizeof(uint16_t) * (size16 - oldVectorSize));
|
|
||||||
memcpy(fragmentationTimeDiff, oldTimeDiffs,
|
|
||||||
sizeof(uint16_t) * oldVectorSize);
|
|
||||||
delete[] oldTimeDiffs;
|
|
||||||
}
|
|
||||||
// payload type
|
|
||||||
{
|
|
||||||
uint8_t* oldTimePlTypes = fragmentationPlType;
|
|
||||||
fragmentationPlType = new uint8_t[size16];
|
|
||||||
memset(fragmentationPlType + oldVectorSize, 0,
|
|
||||||
sizeof(uint8_t) * (size16 - oldVectorSize));
|
|
||||||
memcpy(fragmentationPlType, oldTimePlTypes,
|
|
||||||
sizeof(uint8_t) * oldVectorSize);
|
|
||||||
delete[] oldTimePlTypes;
|
|
||||||
}
|
|
||||||
fragmentationVectorSize = size16;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
// TODO(danilchap): Move all members to private section,
|
||||||
|
// simplify by replacing 4 raw arrays with single std::vector<Fragment>
|
||||||
uint16_t fragmentationVectorSize; // Number of fragmentations
|
uint16_t fragmentationVectorSize; // Number of fragmentations
|
||||||
size_t* fragmentationOffset; // Offset of pointer to data for each
|
size_t* fragmentationOffset; // Offset of pointer to data for each
|
||||||
// fragmentation
|
// fragmentation
|
||||||
|
@ -188,9 +65,6 @@ class RTPFragmentationHeader {
|
||||||
uint16_t* fragmentationTimeDiff; // Timestamp difference relative "now" for
|
uint16_t* fragmentationTimeDiff; // Timestamp difference relative "now" for
|
||||||
// each fragmentation
|
// each fragmentation
|
||||||
uint8_t* fragmentationPlType; // Payload type of each fragmentation
|
uint8_t* fragmentationPlType; // Payload type of each fragmentation
|
||||||
|
|
||||||
private:
|
|
||||||
RTC_DISALLOW_COPY_AND_ASSIGN(RTPFragmentationHeader);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
struct RTCPVoIPMetric {
|
struct RTCPVoIPMetric {
|
||||||
|
|
|
@ -25,6 +25,7 @@ rtc_static_library("pacing") {
|
||||||
":interval_budget",
|
":interval_budget",
|
||||||
"..:module_api",
|
"..:module_api",
|
||||||
"../../:webrtc_common",
|
"../../:webrtc_common",
|
||||||
|
"../../api/transport:network_control",
|
||||||
"../../logging:rtc_event_bwe",
|
"../../logging:rtc_event_bwe",
|
||||||
"../../logging:rtc_event_log_api",
|
"../../logging:rtc_event_log_api",
|
||||||
"../../logging:rtc_event_pacing",
|
"../../logging:rtc_event_pacing",
|
||||||
|
|
|
@ -13,6 +13,7 @@
|
||||||
|
|
||||||
#include <queue>
|
#include <queue>
|
||||||
|
|
||||||
|
#include "api/transport/network_types.h"
|
||||||
#include "modules/include/module_common_types.h"
|
#include "modules/include/module_common_types.h"
|
||||||
|
|
||||||
namespace webrtc {
|
namespace webrtc {
|
||||||
|
|
|
@ -90,6 +90,7 @@ rtc_source_set("rtp_rtcp_format") {
|
||||||
"../../api:array_view",
|
"../../api:array_view",
|
||||||
"../../api:libjingle_peerconnection_api",
|
"../../api:libjingle_peerconnection_api",
|
||||||
"../../api/audio_codecs:audio_codecs_api",
|
"../../api/audio_codecs:audio_codecs_api",
|
||||||
|
"../../api/transport:network_control",
|
||||||
"../../api/video:video_frame",
|
"../../api/video:video_frame",
|
||||||
"../../common_video",
|
"../../common_video",
|
||||||
"../../rtc_base:checks",
|
"../../rtc_base:checks",
|
||||||
|
|
|
@ -18,6 +18,7 @@
|
||||||
#include "absl/types/variant.h"
|
#include "absl/types/variant.h"
|
||||||
#include "api/audio_codecs/audio_format.h"
|
#include "api/audio_codecs/audio_format.h"
|
||||||
#include "api/rtp_headers.h"
|
#include "api/rtp_headers.h"
|
||||||
|
#include "api/transport/network_types.h"
|
||||||
#include "common_types.h" // NOLINT(build/include)
|
#include "common_types.h" // NOLINT(build/include)
|
||||||
#include "modules/include/module_common_types.h"
|
#include "modules/include/module_common_types.h"
|
||||||
#include "system_wrappers/include/clock.h"
|
#include "system_wrappers/include/clock.h"
|
||||||
|
|
|
@ -11,6 +11,7 @@
|
||||||
#include "modules/video_coding/codecs/test/videocodec_test_fixture_impl.h"
|
#include "modules/video_coding/codecs/test/videocodec_test_fixture_impl.h"
|
||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
#include <cmath>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include <utility>
|
#include <utility>
|
||||||
|
|
||||||
|
|
|
@ -15,6 +15,7 @@
|
||||||
#include "modules/video_coding/utility/vp8_header_parser.h"
|
#include "modules/video_coding/utility/vp8_header_parser.h"
|
||||||
#include "modules/video_coding/utility/vp9_uncompressed_header_parser.h"
|
#include "modules/video_coding/utility/vp9_uncompressed_header_parser.h"
|
||||||
#include "rtc_base/logging.h"
|
#include "rtc_base/logging.h"
|
||||||
|
#include "rtc_base/timeutils.h"
|
||||||
#include "sdk/android/generated_video_jni/jni/VideoDecoderWrapper_jni.h"
|
#include "sdk/android/generated_video_jni/jni/VideoDecoderWrapper_jni.h"
|
||||||
#include "sdk/android/generated_video_jni/jni/VideoDecoder_jni.h"
|
#include "sdk/android/generated_video_jni/jni/VideoDecoder_jni.h"
|
||||||
#include "sdk/android/native_api/jni/java_types.h"
|
#include "sdk/android/native_api/jni/java_types.h"
|
||||||
|
|
|
@ -19,6 +19,7 @@
|
||||||
#include "modules/video_coding/utility/vp8_header_parser.h"
|
#include "modules/video_coding/utility/vp8_header_parser.h"
|
||||||
#include "modules/video_coding/utility/vp9_uncompressed_header_parser.h"
|
#include "modules/video_coding/utility/vp9_uncompressed_header_parser.h"
|
||||||
#include "rtc_base/logging.h"
|
#include "rtc_base/logging.h"
|
||||||
|
#include "rtc_base/timeutils.h"
|
||||||
#include "sdk/android/generated_video_jni/jni/VideoEncoderWrapper_jni.h"
|
#include "sdk/android/generated_video_jni/jni/VideoEncoderWrapper_jni.h"
|
||||||
#include "sdk/android/generated_video_jni/jni/VideoEncoder_jni.h"
|
#include "sdk/android/generated_video_jni/jni/VideoEncoder_jni.h"
|
||||||
#include "sdk/android/native_api/jni/class_loader.h"
|
#include "sdk/android/native_api/jni/class_loader.h"
|
||||||
|
|
|
@ -13,6 +13,7 @@
|
||||||
#include "absl/memory/memory.h"
|
#include "absl/memory/memory.h"
|
||||||
#include "rtc_base/logging.h"
|
#include "rtc_base/logging.h"
|
||||||
#include "rtc_base/numerics/mod_ops.h"
|
#include "rtc_base/numerics/mod_ops.h"
|
||||||
|
#include "rtc_base/timeutils.h"
|
||||||
|
|
||||||
namespace webrtc {
|
namespace webrtc {
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue