Cleanup RtpPacketizerVp9

Merge SetPayloadData into constructor.
Reuse payload size split function

Bug: webrtc:9680
Change-Id: If230a4ea901b5cdd6a376f8dd2db48e94d6dca36
Reviewed-on: https://webrtc-review.googlesource.com/98866
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24635}
This commit is contained in:
Danil Chapovalov
2018-09-07 18:33:35 +02:00
committed by Commit Bot
parent 5af3051f84
commit 0b445c6271
4 changed files with 80 additions and 225 deletions

View File

@ -47,10 +47,7 @@ std::unique_ptr<RtpPacketizer> RtpPacketizer::Create(
case kVideoCodecVP9: {
const auto& vp9 =
absl::get<RTPVideoHeaderVP9>(rtp_video_header.video_type_header);
auto packetizer = absl::make_unique<RtpPacketizerVp9>(
vp9, limits.max_payload_len, limits.last_packet_reduction_len);
packetizer->SetPayloadData(payload.data(), payload.size(), nullptr);
return std::move(packetizer);
return absl::make_unique<RtpPacketizerVp9>(payload, limits, vp9);
}
default: {
return absl::make_unique<RtpPacketizerGeneric>(