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}
diff --git a/modules/video_coding/frame_buffer2_unittest.cc b/modules/video_coding/frame_buffer2_unittest.cc
index e179dad..68acf81 100644
--- a/modules/video_coding/frame_buffer2_unittest.cc
+++ b/modules/video_coding/frame_buffer2_unittest.cc
@@ -199,7 +199,7 @@
time_task_queue_.PostTask([this, max_wait_time, keyframe_required]() {
buffer_->NextFrame(
max_wait_time, keyframe_required, &time_task_queue_,
- [this](std::unique_ptr<video_coding::EncodedFrame> frame,
+ [this](std::unique_ptr<EncodedFrame> frame,
video_coding::FrameBuffer::ReturnReason reason) {
if (reason != FrameBuffer::ReturnReason::kStopped) {
frames_.emplace_back(std::move(frame));
diff --git a/modules/video_coding/frame_object.cc b/modules/video_coding/frame_object.cc
index 25fd232..8d011b9 100644
--- a/modules/video_coding/frame_object.cc
+++ b/modules/video_coding/frame_object.cc
@@ -19,7 +19,6 @@
#include "rtc_base/checks.h"
namespace webrtc {
-namespace video_coding {
RtpFrameObject::RtpFrameObject(
uint16_t first_seq_num,
uint16_t last_seq_num,
@@ -128,5 +127,4 @@
return rtp_video_header_;
}
-} // namespace video_coding
} // namespace webrtc
diff --git a/modules/video_coding/frame_object.h b/modules/video_coding/frame_object.h
index d812b8f..3b0d94a 100644
--- a/modules/video_coding/frame_object.h
+++ b/modules/video_coding/frame_object.h
@@ -15,7 +15,6 @@
#include "api/video/encoded_frame.h"
namespace webrtc {
-namespace video_coding {
class RtpFrameObject : public EncodedFrame {
public:
@@ -64,7 +63,11 @@
int times_nacked_;
};
+// TODO(bugs.webrtc.org/12579): Remove when downstream has been updated.
+namespace video_coding {
+using ::webrtc::RtpFrameObject;
} // namespace video_coding
+
} // namespace webrtc
#endif // MODULES_VIDEO_CODING_FRAME_OBJECT_H_
diff --git a/modules/video_coding/rtp_frame_id_only_ref_finder.cc b/modules/video_coding/rtp_frame_id_only_ref_finder.cc
index 8846e68..9f3d5bb 100644
--- a/modules/video_coding/rtp_frame_id_only_ref_finder.cc
+++ b/modules/video_coding/rtp_frame_id_only_ref_finder.cc
@@ -17,7 +17,7 @@
namespace webrtc {
RtpFrameReferenceFinder::ReturnVector RtpFrameIdOnlyRefFinder::ManageFrame(
- std::unique_ptr<video_coding::RtpFrameObject> frame,
+ std::unique_ptr<RtpFrameObject> frame,
int frame_id) {
frame->SetSpatialIndex(0);
frame->SetId(unwrapper_.Unwrap(frame_id & (kFrameIdLength - 1)));
diff --git a/modules/video_coding/rtp_frame_id_only_ref_finder.h b/modules/video_coding/rtp_frame_id_only_ref_finder.h
index 4dc8250..1df4870 100644
--- a/modules/video_coding/rtp_frame_id_only_ref_finder.h
+++ b/modules/video_coding/rtp_frame_id_only_ref_finder.h
@@ -25,7 +25,7 @@
RtpFrameIdOnlyRefFinder() = default;
RtpFrameReferenceFinder::ReturnVector ManageFrame(
- std::unique_ptr<video_coding::RtpFrameObject> frame,
+ std::unique_ptr<RtpFrameObject> frame,
int frame_id);
private:
diff --git a/modules/video_coding/rtp_frame_reference_finder.cc b/modules/video_coding/rtp_frame_reference_finder.cc
index 4d24546..a060f84 100644
--- a/modules/video_coding/rtp_frame_reference_finder.cc
+++ b/modules/video_coding/rtp_frame_reference_finder.cc
@@ -27,7 +27,7 @@
RtpFrameReferenceFinderImpl() = default;
RtpFrameReferenceFinder::ReturnVector ManageFrame(
- std::unique_ptr<video_coding::RtpFrameObject> frame);
+ std::unique_ptr<RtpFrameObject> frame);
RtpFrameReferenceFinder::ReturnVector PaddingReceived(uint16_t seq_num);
void ClearTo(uint16_t seq_num);
@@ -45,7 +45,7 @@
};
RtpFrameReferenceFinder::ReturnVector RtpFrameReferenceFinderImpl::ManageFrame(
- std::unique_ptr<video_coding::RtpFrameObject> frame) {
+ std::unique_ptr<RtpFrameObject> frame) {
const RTPVideoHeader& video_header = frame->GetRtpVideoHeader();
if (video_header.generic.has_value()) {
@@ -156,7 +156,7 @@
RtpFrameReferenceFinder::~RtpFrameReferenceFinder() = default;
void RtpFrameReferenceFinder::ManageFrame(
- std::unique_ptr<video_coding::RtpFrameObject> frame) {
+ std::unique_ptr<RtpFrameObject> frame) {
// If we have cleared past this frame, drop it.
if (cleared_to_seq_num_ != -1 &&
AheadOf<uint16_t>(cleared_to_seq_num_, frame->first_seq_num())) {
diff --git a/modules/video_coding/rtp_frame_reference_finder.h b/modules/video_coding/rtp_frame_reference_finder.h
index d3b0cc5..4667522 100644
--- a/modules/video_coding/rtp_frame_reference_finder.h
+++ b/modules/video_coding/rtp_frame_reference_finder.h
@@ -25,8 +25,7 @@
class OnCompleteFrameCallback {
public:
virtual ~OnCompleteFrameCallback() {}
- virtual void OnCompleteFrame(
- std::unique_ptr<video_coding::EncodedFrame> frame) = 0;
+ virtual void OnCompleteFrame(std::unique_ptr<EncodedFrame> frame) = 0;
};
// TODO(bugs.webrtc.org/12579): Remove when downstream has been update.
@@ -36,8 +35,7 @@
class RtpFrameReferenceFinder {
public:
- using ReturnVector =
- absl::InlinedVector<std::unique_ptr<video_coding::RtpFrameObject>, 3>;
+ using ReturnVector = absl::InlinedVector<std::unique_ptr<RtpFrameObject>, 3>;
explicit RtpFrameReferenceFinder(OnCompleteFrameCallback* frame_callback);
explicit RtpFrameReferenceFinder(OnCompleteFrameCallback* frame_callback,
@@ -50,7 +48,7 @@
// - We have too many stashed frames (determined by |kMaxStashedFrames|)
// so we drop this frame, or
// - It gets cleared by ClearTo, which also means we drop it.
- void ManageFrame(std::unique_ptr<video_coding::RtpFrameObject> frame);
+ void ManageFrame(std::unique_ptr<RtpFrameObject> frame);
// Notifies that padding has been received, which the reference finder
// might need to calculate the references of a frame.
diff --git a/modules/video_coding/rtp_frame_reference_finder_unittest.cc b/modules/video_coding/rtp_frame_reference_finder_unittest.cc
index de8c1ae..5141b49 100644
--- a/modules/video_coding/rtp_frame_reference_finder_unittest.cc
+++ b/modules/video_coding/rtp_frame_reference_finder_unittest.cc
@@ -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 @@
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 @@
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 @@
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 @@
}
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 @@
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, 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 @@
CheckReferencesGeneric(sn);
}
-} // namespace video_coding
} // namespace webrtc
diff --git a/modules/video_coding/rtp_generic_ref_finder.cc b/modules/video_coding/rtp_generic_ref_finder.cc
index 3a2a94e..87fff9c 100644
--- a/modules/video_coding/rtp_generic_ref_finder.cc
+++ b/modules/video_coding/rtp_generic_ref_finder.cc
@@ -17,7 +17,7 @@
namespace webrtc {
RtpFrameReferenceFinder::ReturnVector RtpGenericFrameRefFinder::ManageFrame(
- std::unique_ptr<video_coding::RtpFrameObject> frame,
+ std::unique_ptr<RtpFrameObject> frame,
const RTPVideoHeader::GenericDescriptorInfo& descriptor) {
// Frame IDs are unwrapped in the RtpVideoStreamReceiver, no need to unwrap
// them here.
@@ -25,8 +25,7 @@
frame->SetSpatialIndex(descriptor.spatial_index);
RtpFrameReferenceFinder::ReturnVector res;
- if (video_coding::EncodedFrame::kMaxFrameReferences <
- descriptor.dependencies.size()) {
+ if (EncodedFrame::kMaxFrameReferences < descriptor.dependencies.size()) {
RTC_LOG(LS_WARNING) << "Too many dependencies in generic descriptor.";
return res;
}
diff --git a/modules/video_coding/rtp_generic_ref_finder.h b/modules/video_coding/rtp_generic_ref_finder.h
index 5f8462a..87d7b59 100644
--- a/modules/video_coding/rtp_generic_ref_finder.h
+++ b/modules/video_coding/rtp_generic_ref_finder.h
@@ -23,7 +23,7 @@
RtpGenericFrameRefFinder() = default;
RtpFrameReferenceFinder::ReturnVector ManageFrame(
- std::unique_ptr<video_coding::RtpFrameObject> frame,
+ std::unique_ptr<RtpFrameObject> frame,
const RTPVideoHeader::GenericDescriptorInfo& descriptor);
};
diff --git a/modules/video_coding/rtp_seq_num_only_ref_finder.cc b/modules/video_coding/rtp_seq_num_only_ref_finder.cc
index 3202313..4381cf0 100644
--- a/modules/video_coding/rtp_seq_num_only_ref_finder.cc
+++ b/modules/video_coding/rtp_seq_num_only_ref_finder.cc
@@ -17,7 +17,7 @@
namespace webrtc {
RtpFrameReferenceFinder::ReturnVector RtpSeqNumOnlyRefFinder::ManageFrame(
- std::unique_ptr<video_coding::RtpFrameObject> frame) {
+ std::unique_ptr<RtpFrameObject> frame) {
FrameDecision decision = ManageFrameInternal(frame.get());
RtpFrameReferenceFinder::ReturnVector res;
@@ -39,8 +39,7 @@
}
RtpSeqNumOnlyRefFinder::FrameDecision
-RtpSeqNumOnlyRefFinder::ManageFrameInternal(
- video_coding::RtpFrameObject* frame) {
+RtpSeqNumOnlyRefFinder::ManageFrameInternal(RtpFrameObject* frame) {
if (frame->frame_type() == VideoFrameType::kVideoFrameKey) {
last_seq_num_gop_.insert(std::make_pair(
frame->last_seq_num(),
diff --git a/modules/video_coding/rtp_seq_num_only_ref_finder.h b/modules/video_coding/rtp_seq_num_only_ref_finder.h
index e6cf0f6..ef3c022 100644
--- a/modules/video_coding/rtp_seq_num_only_ref_finder.h
+++ b/modules/video_coding/rtp_seq_num_only_ref_finder.h
@@ -29,7 +29,7 @@
RtpSeqNumOnlyRefFinder() = default;
RtpFrameReferenceFinder::ReturnVector ManageFrame(
- std::unique_ptr<video_coding::RtpFrameObject> frame);
+ std::unique_ptr<RtpFrameObject> frame);
RtpFrameReferenceFinder::ReturnVector PaddingReceived(uint16_t seq_num);
void ClearTo(uint16_t seq_num);
@@ -39,7 +39,7 @@
enum FrameDecision { kStash, kHandOff, kDrop };
- FrameDecision ManageFrameInternal(video_coding::RtpFrameObject* frame);
+ FrameDecision ManageFrameInternal(RtpFrameObject* frame);
void RetryStashedFrames(RtpFrameReferenceFinder::ReturnVector& res);
void UpdateLastPictureIdWithPadding(uint16_t seq_num);
@@ -58,7 +58,7 @@
// Frames that have been fully received but didn't have all the information
// needed to determine their references.
- std::deque<std::unique_ptr<video_coding::RtpFrameObject>> stashed_frames_;
+ std::deque<std::unique_ptr<RtpFrameObject>> stashed_frames_;
// Unwrapper used to unwrap generic RTP streams. In a generic stream we derive
// a picture id from the packet sequence number.
diff --git a/modules/video_coding/rtp_vp8_ref_finder.cc b/modules/video_coding/rtp_vp8_ref_finder.cc
index 0074558..b448b23 100644
--- a/modules/video_coding/rtp_vp8_ref_finder.cc
+++ b/modules/video_coding/rtp_vp8_ref_finder.cc
@@ -17,7 +17,7 @@
namespace webrtc {
RtpFrameReferenceFinder::ReturnVector RtpVp8RefFinder::ManageFrame(
- std::unique_ptr<video_coding::RtpFrameObject> frame) {
+ std::unique_ptr<RtpFrameObject> frame) {
FrameDecision decision = ManageFrameInternal(frame.get());
RtpFrameReferenceFinder::ReturnVector res;
@@ -39,7 +39,7 @@
}
RtpVp8RefFinder::FrameDecision RtpVp8RefFinder::ManageFrameInternal(
- video_coding::RtpFrameObject* frame) {
+ RtpFrameObject* frame) {
const RTPVideoHeader& video_header = frame->GetRtpVideoHeader();
const RTPVideoHeaderVP8& codec_header =
absl::get<RTPVideoHeaderVP8>(video_header.video_type_header);
@@ -178,7 +178,7 @@
return kHandOff;
}
-void RtpVp8RefFinder::UpdateLayerInfoVp8(video_coding::RtpFrameObject* frame,
+void RtpVp8RefFinder::UpdateLayerInfoVp8(RtpFrameObject* frame,
int64_t unwrapped_tl0,
uint8_t temporal_idx) {
auto layer_info_it = layer_info_.find(unwrapped_tl0);
@@ -226,7 +226,7 @@
} while (complete_frame);
}
-void RtpVp8RefFinder::UnwrapPictureIds(video_coding::RtpFrameObject* frame) {
+void RtpVp8RefFinder::UnwrapPictureIds(RtpFrameObject* frame) {
for (size_t i = 0; i < frame->num_references; ++i)
frame->references[i] = unwrapper_.Unwrap(frame->references[i]);
frame->SetId(unwrapper_.Unwrap(frame->Id()));
diff --git a/modules/video_coding/rtp_vp8_ref_finder.h b/modules/video_coding/rtp_vp8_ref_finder.h
index 4ac4d10..0a6cd7e 100644
--- a/modules/video_coding/rtp_vp8_ref_finder.h
+++ b/modules/video_coding/rtp_vp8_ref_finder.h
@@ -28,7 +28,7 @@
RtpVp8RefFinder() = default;
RtpFrameReferenceFinder::ReturnVector ManageFrame(
- std::unique_ptr<video_coding::RtpFrameObject> frame);
+ std::unique_ptr<RtpFrameObject> frame);
void ClearTo(uint16_t seq_num);
private:
@@ -40,12 +40,12 @@
enum FrameDecision { kStash, kHandOff, kDrop };
- FrameDecision ManageFrameInternal(video_coding::RtpFrameObject* frame);
+ FrameDecision ManageFrameInternal(RtpFrameObject* frame);
void RetryStashedFrames(RtpFrameReferenceFinder::ReturnVector& res);
- void UpdateLayerInfoVp8(video_coding::RtpFrameObject* frame,
+ void UpdateLayerInfoVp8(RtpFrameObject* frame,
int64_t unwrapped_tl0,
uint8_t temporal_idx);
- void UnwrapPictureIds(video_coding::RtpFrameObject* frame);
+ void UnwrapPictureIds(RtpFrameObject* frame);
// Save the last picture id in order to detect when there is a gap in frames
// that have not yet been fully received.
@@ -58,7 +58,7 @@
// Frames that have been fully received but didn't have all the information
// needed to determine their references.
- std::deque<std::unique_ptr<video_coding::RtpFrameObject>> stashed_frames_;
+ std::deque<std::unique_ptr<RtpFrameObject>> stashed_frames_;
// Holds the information about the last completed frame for a given temporal
// layer given an unwrapped Tl0 picture index.
diff --git a/modules/video_coding/rtp_vp8_ref_finder_unittest.cc b/modules/video_coding/rtp_vp8_ref_finder_unittest.cc
index 34836e6..a77149a 100644
--- a/modules/video_coding/rtp_vp8_ref_finder_unittest.cc
+++ b/modules/video_coding/rtp_vp8_ref_finder_unittest.cc
@@ -25,7 +25,6 @@
using ::testing::UnorderedElementsAreArray;
namespace webrtc {
-namespace video_coding {
namespace {
MATCHER_P2(HasIdAndRefs, id, refs, "") {
@@ -34,7 +33,7 @@
rtc::ArrayView<int64_t>(arg->references, arg->num_references));
}
-Matcher<const std::vector<std::unique_ptr<video_coding::EncodedFrame>>&>
+Matcher<const std::vector<std::unique_ptr<EncodedFrame>>&>
HasFrameWithIdAndRefs(int64_t frame_id, const std::vector<int64_t>& refs) {
return Contains(HasIdAndRefs(frame_id, refs));
}
@@ -66,7 +65,7 @@
return *this;
}
- operator std::unique_ptr<video_coding::RtpFrameObject>() {
+ operator std::unique_ptr<RtpFrameObject>() {
RTPVideoHeaderVP8 vp8_header{};
vp8_header.pictureId = *picture_id_;
vp8_header.temporalIdx = *temporal_id_;
@@ -78,7 +77,7 @@
: VideoFrameType::kVideoFrameDelta;
video_header.video_type_header = vp8_header;
// clang-format off
- return std::make_unique<video_coding::RtpFrameObject>(
+ return std::make_unique<RtpFrameObject>(
/*seq_num_start=*/0,
/*seq_num_end=*/0,
/*markerBit=*/true,
@@ -113,14 +112,14 @@
protected:
RtpVp8RefFinderTest() : ref_finder_(std::make_unique<RtpVp8RefFinder>()) {}
- void Insert(std::unique_ptr<video_coding::RtpFrameObject> frame) {
+ void Insert(std::unique_ptr<RtpFrameObject> frame) {
for (auto& f : ref_finder_->ManageFrame(std::move(frame))) {
frames_.push_back(std::move(f));
}
}
std::unique_ptr<RtpVp8RefFinder> ref_finder_;
- std::vector<std::unique_ptr<video_coding::EncodedFrame>> frames_;
+ std::vector<std::unique_ptr<EncodedFrame>> frames_;
};
TEST_F(RtpVp8RefFinderTest, Vp8RepeatedFrame_0) {
@@ -358,5 +357,4 @@
EXPECT_THAT(frames_, HasFrameWithIdAndRefs(8, {5, 6, 7}));
}
-} // namespace video_coding
} // namespace webrtc
diff --git a/modules/video_coding/rtp_vp9_ref_finder.cc b/modules/video_coding/rtp_vp9_ref_finder.cc
index 46a0946..b44bb25 100644
--- a/modules/video_coding/rtp_vp9_ref_finder.cc
+++ b/modules/video_coding/rtp_vp9_ref_finder.cc
@@ -18,7 +18,7 @@
namespace webrtc {
RtpFrameReferenceFinder::ReturnVector RtpVp9RefFinder::ManageFrame(
- std::unique_ptr<video_coding::RtpFrameObject> frame) {
+ std::unique_ptr<RtpFrameObject> frame) {
FrameDecision decision = ManageFrameInternal(frame.get());
RtpFrameReferenceFinder::ReturnVector res;
@@ -40,7 +40,7 @@
}
RtpVp9RefFinder::FrameDecision RtpVp9RefFinder::ManageFrameInternal(
- video_coding::RtpFrameObject* frame) {
+ RtpFrameObject* frame) {
const RTPVideoHeader& video_header = frame->GetRtpVideoHeader();
const RTPVideoHeaderVP9& codec_header =
absl::get<RTPVideoHeaderVP9>(video_header.video_type_header);
@@ -57,8 +57,7 @@
last_picture_id_ = frame->Id();
if (codec_header.flexible_mode) {
- if (codec_header.num_ref_pics >
- video_coding::EncodedFrame::kMaxFrameReferences) {
+ if (codec_header.num_ref_pics > EncodedFrame::kMaxFrameReferences) {
return kDrop;
}
frame->num_references = codec_header.num_ref_pics;
@@ -179,8 +178,7 @@
ForwardDiff<uint16_t, kFrameIdLength>(info->gof->pid_start, frame->Id());
size_t gof_idx = diff % info->gof->num_frames_in_gof;
- if (info->gof->num_ref_pics[gof_idx] >
- video_coding::EncodedFrame::kMaxFrameReferences) {
+ if (info->gof->num_ref_pics[gof_idx] > EncodedFrame::kMaxFrameReferences) {
return kDrop;
}
// Populate references according to the scalability structure.
@@ -324,7 +322,7 @@
} while (complete_frame);
}
-void RtpVp9RefFinder::FlattenFrameIdAndRefs(video_coding::RtpFrameObject* frame,
+void RtpVp9RefFinder::FlattenFrameIdAndRefs(RtpFrameObject* frame,
bool inter_layer_predicted) {
for (size_t i = 0; i < frame->num_references; ++i) {
frame->references[i] =
@@ -335,8 +333,7 @@
*frame->SpatialIndex());
if (inter_layer_predicted &&
- frame->num_references + 1 <=
- video_coding::EncodedFrame::kMaxFrameReferences) {
+ frame->num_references + 1 <= EncodedFrame::kMaxFrameReferences) {
frame->references[frame->num_references] = frame->Id() - 1;
++frame->num_references;
}
diff --git a/modules/video_coding/rtp_vp9_ref_finder.h b/modules/video_coding/rtp_vp9_ref_finder.h
index 0179918..81008fe 100644
--- a/modules/video_coding/rtp_vp9_ref_finder.h
+++ b/modules/video_coding/rtp_vp9_ref_finder.h
@@ -28,7 +28,7 @@
RtpVp9RefFinder() = default;
RtpFrameReferenceFinder::ReturnVector ManageFrame(
- std::unique_ptr<video_coding::RtpFrameObject> frame);
+ std::unique_ptr<RtpFrameObject> frame);
void ClearTo(uint16_t seq_num);
private:
@@ -48,7 +48,7 @@
uint16_t last_picture_id;
};
- FrameDecision ManageFrameInternal(video_coding::RtpFrameObject* frame);
+ FrameDecision ManageFrameInternal(RtpFrameObject* frame);
void RetryStashedFrames(RtpFrameReferenceFinder::ReturnVector& res);
bool MissingRequiredFrameVp9(uint16_t picture_id, const GofInfo& info);
@@ -58,8 +58,7 @@
uint8_t temporal_idx,
uint16_t pid_ref);
- void FlattenFrameIdAndRefs(video_coding::RtpFrameObject* frame,
- bool inter_layer_predicted);
+ void FlattenFrameIdAndRefs(RtpFrameObject* frame, bool inter_layer_predicted);
// Save the last picture id in order to detect when there is a gap in frames
// that have not yet been fully received.
@@ -67,7 +66,7 @@
// Frames that have been fully received but didn't have all the information
// needed to determine their references.
- std::deque<std::unique_ptr<video_coding::RtpFrameObject>> stashed_frames_;
+ std::deque<std::unique_ptr<RtpFrameObject>> stashed_frames_;
// Where the current scalability structure is in the
// |scalability_structures_| array.
diff --git a/modules/video_coding/rtp_vp9_ref_finder_unittest.cc b/modules/video_coding/rtp_vp9_ref_finder_unittest.cc
index 7b2d02a..6de7ce1 100644
--- a/modules/video_coding/rtp_vp9_ref_finder_unittest.cc
+++ b/modules/video_coding/rtp_vp9_ref_finder_unittest.cc
@@ -26,7 +26,6 @@
using ::testing::UnorderedElementsAreArray;
namespace webrtc {
-namespace video_coding {
namespace {
class Frame {
@@ -83,7 +82,7 @@
return *this;
}
- operator std::unique_ptr<video_coding::RtpFrameObject>() {
+ operator std::unique_ptr<RtpFrameObject>() {
RTPVideoHeaderVP9 vp9_header{};
vp9_header.picture_id = *picture_id;
vp9_header.temporal_idx = *temporal_id;
@@ -112,7 +111,7 @@
: VideoFrameType::kVideoFrameDelta;
video_header.video_type_header = vp9_header;
// clang-format off
- return std::make_unique<video_coding::RtpFrameObject>(
+ return std::make_unique<RtpFrameObject>(
seq_num_start,
seq_num_end,
/*markerBit=*/true,
@@ -209,7 +208,7 @@
protected:
RtpVp9RefFinderTest() : ref_finder_(std::make_unique<RtpVp9RefFinder>()) {}
- void Insert(std::unique_ptr<video_coding::RtpFrameObject> frame) {
+ void Insert(std::unique_ptr<RtpFrameObject> frame) {
for (auto& f : ref_finder_->ManageFrame(std::move(frame))) {
frames_.push_back(std::move(f));
}
@@ -703,5 +702,4 @@
Contains(Pointee(Property(&EncodedFrame::SpatialIndex, 2))));
}
-} // namespace video_coding
} // namespace webrtc