Move vp8 rtp depacketization to VideoRtpDepacketizerVp8

Bug: webrtc:11152
Change-Id: Ic2b7fd091cb4d095ce29fbe06196f6424c08fce1
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/161451
Reviewed-by: Markus Handell <handellm@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30088}
This commit is contained in:
Danil Chapovalov
2019-12-11 11:24:37 +01:00
committed by Commit Bot
parent 41466b7bef
commit eae6896f76
6 changed files with 494 additions and 206 deletions

View File

@ -16,6 +16,7 @@
#include "absl/types/optional.h"
#include "modules/rtp_rtcp/source/rtp_format.h"
#include "modules/rtp_rtcp/source/video_rtp_depacketizer.h"
#include "modules/rtp_rtcp/source/video_rtp_depacketizer_vp8.h"
#include "rtc_base/checks.h"
#include "rtc_base/copy_on_write_buffer.h"
@ -56,7 +57,12 @@ std::unique_ptr<VideoRtpDepacketizer> CreateVideoRtpDepacketizer(
VideoCodecType codec) {
// TODO(bugs.webrtc.org/11152): switch on codec and create specialized
// VideoRtpDepacketizers when they are migrated to new interface.
return std::make_unique<LegacyRtpDepacketizer>(codec);
switch (codec) {
case kVideoCodecVP8:
return std::make_unique<VideoRtpDepacketizerVp8>();
default:
return std::make_unique<LegacyRtpDepacketizer>(codec);
}
}
} // namespace webrtc