in PacketBuffer::Packet pass payload using smart buffer

Together with RtpDepacketizer refactoring that would reduce
number of memcpy while handling an rtp packet

Bug: webrtc:11152
Change-Id: I6f4e09c93af5e2a9314967a15eac8ced57ec712e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/161087
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29985}
This commit is contained in:
Danil Chapovalov
2019-12-02 15:54:27 +01:00
committed by Commit Bot
parent 5d3a418a26
commit e3c4884b76
8 changed files with 115 additions and 230 deletions

View File

@ -23,6 +23,7 @@
#include "modules/rtp_rtcp/source/rtp_packet_received.h"
#include "modules/rtp_rtcp/source/rtp_video_header.h"
#include "modules/video_coding/frame_object.h"
#include "rtc_base/copy_on_write_buffer.h"
#include "rtc_base/critical_section.h"
#include "rtc_base/numerics/sequence_number_util.h"
#include "rtc_base/thread_annotations.h"
@ -64,9 +65,7 @@ class PacketBuffer {
int64_t ntp_time_ms = -1;
int times_nacked = -1;
const uint8_t* data = nullptr;
size_t size_bytes = 0;
rtc::CopyOnWriteBuffer video_payload;
RTPVideoHeader video_header;
absl::optional<RtpGenericFrameDescriptor> generic_descriptor;