Move RtpFrameObject and EncodedFrame out of video_coding namespace.

Bug: webrtc:12579
Change-Id: Ib7ecd624eb5c54abb77fe08440a014aa1e963865
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/212860
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33542}
This commit is contained in:
philipel
2021-03-23 12:00:49 +01:00
committed by Commit Bot
parent 93ee168671
commit ca18809ee5
44 changed files with 195 additions and 276 deletions

View File

@ -24,10 +24,9 @@
#include "test/gtest.h"
namespace webrtc {
namespace video_coding {
namespace {
std::unique_ptr<video_coding::RtpFrameObject> CreateFrame(
std::unique_ptr<RtpFrameObject> CreateFrame(
uint16_t seq_num_start,
uint16_t seq_num_end,
bool keyframe,
@ -39,7 +38,7 @@ std::unique_ptr<video_coding::RtpFrameObject> CreateFrame(
video_header.video_type_header = video_type_header;
// clang-format off
return std::make_unique<video_coding::RtpFrameObject>(
return std::make_unique<RtpFrameObject>(
seq_num_start,
seq_num_end,
/*markerBit=*/true,
@ -71,8 +70,7 @@ class TestRtpFrameReferenceFinder : public ::testing::Test,
uint16_t Rand() { return rand_.Rand<uint16_t>(); }
void OnCompleteFrame(
std::unique_ptr<video_coding::EncodedFrame> frame) override {
void OnCompleteFrame(std::unique_ptr<EncodedFrame> frame) override {
int64_t pid = frame->Id();
uint16_t sidx = *frame->SpatialIndex();
auto frame_it = frames_from_callback_.find(std::make_pair(pid, sidx));
@ -89,7 +87,7 @@ class TestRtpFrameReferenceFinder : public ::testing::Test,
void InsertGeneric(uint16_t seq_num_start,
uint16_t seq_num_end,
bool keyframe) {
std::unique_ptr<video_coding::RtpFrameObject> frame =
std::unique_ptr<RtpFrameObject> frame =
CreateFrame(seq_num_start, seq_num_end, keyframe, kVideoCodecGeneric,
RTPVideoTypeHeader());
@ -97,7 +95,7 @@ class TestRtpFrameReferenceFinder : public ::testing::Test,
}
void InsertH264(uint16_t seq_num_start, uint16_t seq_num_end, bool keyframe) {
std::unique_ptr<video_coding::RtpFrameObject> frame =
std::unique_ptr<RtpFrameObject> frame =
CreateFrame(seq_num_start, seq_num_end, keyframe, kVideoCodecH264,
RTPVideoTypeHeader());
reference_finder_->ManageFrame(std::move(frame));
@ -156,10 +154,9 @@ class TestRtpFrameReferenceFinder : public ::testing::Test,
return f1.first < f2.first;
}
};
std::map<std::pair<int64_t, uint8_t>,
std::unique_ptr<video_coding::EncodedFrame>,
FrameComp>
frames_from_callback_;
std::
map<std::pair<int64_t, uint8_t>, std::unique_ptr<EncodedFrame>, FrameComp>
frames_from_callback_;
};
TEST_F(TestRtpFrameReferenceFinder, PaddingPackets) {
@ -307,7 +304,7 @@ TEST_F(TestRtpFrameReferenceFinder, H264SequenceNumberWrapMulti) {
TEST_F(TestRtpFrameReferenceFinder, Av1FrameNoDependencyDescriptor) {
uint16_t sn = 0xFFFF;
std::unique_ptr<video_coding::RtpFrameObject> frame =
std::unique_ptr<RtpFrameObject> frame =
CreateFrame(/*seq_num_start=*/sn, /*seq_num_end=*/sn, /*keyframe=*/true,
kVideoCodecAV1, RTPVideoTypeHeader());
@ -317,5 +314,4 @@ TEST_F(TestRtpFrameReferenceFinder, Av1FrameNoDependencyDescriptor) {
CheckReferencesGeneric(sn);
}
} // namespace video_coding
} // namespace webrtc